forked from v8/v8
-
Notifications
You must be signed in to change notification settings - Fork 0
[builtins] Port String.prototype.{padStart, padEnd} to CSA #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peterwmwong
pushed a commit
that referenced
this pull request
Oct 21, 2017
Example before: Slot #0 BinaryOp MONOMORPHIC [0]: 15 Slot #1 CompareOp MONOMORPHIC [1]: 1 And after: Slot #0 BinaryOp MONOMORPHIC (NumberOrOddball) [0]: 15 Slot #1 CompareOp MONOMORPHIC (SignedSmall) [1]: 1 R=jarin@chromium.org Bug: Change-Id: Ia22437c52289a13bcfd8847d6e5677ad44529b39 Reviewed-on: https://chromium-review.googlesource.com/725815 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#48720}
peterwmwong
pushed a commit
that referenced
this pull request
Feb 17, 2018
This is the v8 side of changes; blink changes are at https://chromium-review.googlesource.com/c/chromium/src/+/809228 BUG=chromium:716320 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Ia77764aed09dd609bf2304fe3c392a0e8ee16334 Reviewed-on: https://chromium-review.googlesource.com/847337 Reviewed-by: v8 autoroll <v8-autoroll@chromium.org> Cr-Original-Commit-Position: refs/heads/6.5.123@{#1} Cr-Original-Branched-From: 2a8e1e4-refs/heads/master@{#50331} Reviewed-on: https://chromium-review.googlesource.com/854395 Commit-Queue: Malcolm White <malcolmwhite@google.com> Reviewed-by: Ben Smith <binji@chromium.org> Cr-Commit-Position: refs/heads/master@{#50699}
peterwmwong
pushed a commit
that referenced
this pull request
Jul 17, 2018
This reverts commit 52a10e5. Reason for revert: https://test-results.appspot.com/data/layout_results/V8-Blink_Linux_64__dbg_/12434/layout-test-results/results.html Crash e.g. in http/tests/devtools/oopif/oopif-performance-cpu-profiles.js crash log for devtools (pid <unknown>): STDOUT: <empty> STDERR: STDERR: STDERR: # STDERR: # Fatal error in ../../v8/src/compilation-dependencies.cc, line 281 STDERR: # Debug check failed: descriptor == owner->LastAdded() (10 vs. 22). STDERR: # STDERR: # STDERR: # STDERR: #FailureMessage Object: 0x7fff86878630#0 0x0000031c642c base::debug::StackTrace::StackTrace() STDERR: #1 0x0000046a56bb gin::(anonymous namespace)::PrintStackTrace() STDERR: #2 0x00000469c528 V8_Fatal() STDERR: #3 0x00000469c285 v8::base::(anonymous namespace)::DefaultDcheckHandler() STDERR: v8#4 0x000001cc5253 v8::internal::CompilationDependencies::DependOnFieldType() STDERR: v8#5 0x000001cdcc46 v8::internal::compiler::AccessInfoFactory::ComputePropertyAccessInfo() STDERR: v8#6 0x000001cde661 v8::internal::compiler::AccessInfoFactory::ComputePropertyAccessInfos() STDERR: v8#7 0x000001dd982b v8::internal::compiler::JSNativeContextSpecialization::ReduceNamedAccess() STDERR: v8#8 0x000001ddb715 v8::internal::compiler::JSNativeContextSpecialization::ReduceNamedAccessFromNexus() STDERR: v8#9 0x000001dd656d v8::internal::compiler::JSNativeContextSpecialization::ReduceJSLoadNamed() STDERR: v8#10 0x000001d53872 v8::internal::compiler::GraphReducer::Reduce() STDERR: v8#11 0x000001d534a5 v8::internal::compiler::GraphReducer::ReduceTop() STDERR: v8#12 0x000001d52e58 v8::internal::compiler::GraphReducer::ReduceNode() STDERR: v8#13 0x000001e4c201 v8::internal::compiler::InliningPhase::Run() STDERR: v8#14 0x000001e44f79 v8::internal::compiler::PipelineImpl::Run<>() STDERR: v8#15 0x000001e41058 v8::internal::compiler::PipelineImpl::CreateGraph() STDERR: v8#16 0x000001e40c75 v8::internal::compiler::PipelineCompilationJob::PrepareJobImpl() STDERR: v8#17 0x000001ccd437 v8::internal::OptimizedCompilationJob::PrepareJob() STDERR: v8#18 0x000001cd071e v8::internal::(anonymous namespace)::GetOptimizedCode() STDERR: v8#19 0x000001cd0c6f v8::internal::Compiler::CompileOptimized() STDERR: v8#20 0x00000231fb62 v8::internal::__RT_impl_Runtime_CompileOptimized_Concurrent() STDERR: v8#21 0x00000288e535 <unknown> Original change's description: > [turbofan] Rewrite CompilationDependencies > > Instead of installing code dependencies during graph reduction, > install them after code generation. > > Bug: v8:7902, v8:7790 > Change-Id: I8a3798254abb5b9ec7c295a1592aeb6b51f24c7a > Reviewed-on: https://chromium-review.googlesource.com/1119913 > Commit-Queue: Georg Neis <neis@chromium.org> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#54170} TBR=mstarzinger@chromium.org,jarin@chromium.org,neis@chromium.org Change-Id: Ic58c2bfadbd34bb6ba7dc0d2b74871cc90b0a74f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:7902, v8:7790 Reviewed-on: https://chromium-review.googlesource.com/1125680 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#54192}
peterwmwong
pushed a commit
that referenced
this pull request
Jul 22, 2018
This should improve the debugging experience since backtraces will list the exact builtin instead of just 'embedded_blob'. An example gdb backtrace: #0 <snip address> in Builtins_RegExpPrototypeExec () #1 <snip address> in Builtins_ArgumentsAdaptorTrampoline () <snip further frames> Bug: v8:6666, v8:7722 Change-Id: Iafc995779903e7d7a980d66e7dad42938ac7d29e Reviewed-on: https://chromium-review.googlesource.com/1145183 Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#54598}
peterwmwong
pushed a commit
that referenced
this pull request
Dec 9, 2018
This reverts commit caed2cc. Reason for revert: Breaks layout tests, e.g. https://test-results.appspot.com/data/layout_results/V8-Blink_Linux_64__dbg_/14924/webkit_layout_tests%20%28with%20patch%29/layout-test-results/results.html crash log for renderer (pid <unknown>): STDOUT: <empty> STDERR: STDERR: STDERR: # STDERR: # Fatal error in ../../v8/src/base/platform/elapsed-timer.h, line 24 STDERR: # Debug check failed: !IsStarted(). STDERR: # STDERR: # STDERR: # STDERR: #FailureMessage Object: 0x7ffc46707640#0 0x565409263b6f base::debug::StackTrace::StackTrace() STDERR: #1 0x56540a8a32fb gin::(anonymous namespace)::PrintStackTrace() STDERR: #2 0x56540a8980d8 V8_Fatal() STDERR: #3 0x56540a897e35 v8::base::(anonymous namespace)::DefaultDcheckHandler() STDERR: v8#4 0x565407971f02 v8::base::ElapsedTimer::Start() STDERR: v8#5 0x565407d08edf v8::internal::TimedHistogram::Start() STDERR: v8#6 0x565407e500d5 v8::internal::IncrementalMarking::AdvanceIncrementalMarkingOnAllocation() STDERR: v8#7 0x565407e4f977 v8::internal::IncrementalMarking::Observer::Step() STDERR: v8#8 0x565407e48092 v8::internal::AllocationObserver::AllocationStep() STDERR: v8#9 0x565407eb0751 v8::internal::SpaceWithLinearArea::InlineAllocationStep() STDERR: v8#10 0x565407eb3e44 v8::internal::NewSpace::EnsureAllocation() STDERR: v8#11 0x565407e258ff v8::internal::NewSpace::AllocateRaw() STDERR: v8#12 0x565407e06b2d v8::internal::Heap::AllocateRaw() STDERR: v8#13 0x565407e432ef v8::internal::Heap::AllocateRawWithLightRetry() STDERR: v8#14 0x565407e433cf v8::internal::Heap::AllocateRawWithRetryOrFail() STDERR: v8#15 0x565407e04d48 v8::internal::Factory::NewFixedArrayWithFiller() STDERR: v8#16 0x565407fd6339 v8::internal::HashTable<>::New() STDERR: v8#17 0x565407fd7be8 v8::internal::HashTable<>::EnsureCapacity() STDERR: v8#18 0x565407fc7e95 v8::internal::Dictionary<>::Add() STDERR: v8#19 0x565407fcf453 v8::internal::BaseNameDictionary<>::Add() STDERR: v8#20 0x565407f89ee4 v8::internal::LookupIterator::ApplyTransitionToDataProperty() STDERR: v8#21 0x5654080036e2 v8::internal::Object::AddDataProperty() STDERR: v8#22 0x56540793061f v8::internal::(anonymous namespace)::DefineDataProperty() STDERR: v8#23 0x56540792da59 v8::internal::(anonymous namespace)::InstantiateObject() STDERR: v8#24 0x56540792b75a v8::internal::(anonymous namespace)::InstantiateFunction() STDERR: v8#25 0x56540792b4db v8::internal::ApiNatives::InstantiateFunction() STDERR: v8#26 0x5654079594bf v8::FunctionTemplate::GetFunction() STDERR: v8#27 0x56540a7af74e blink::V8ObjectConstructor::CreateInterfaceObject() STDERR: v8#28 0x56540a7afe01 blink::V8PerContextData::ConstructorForTypeSlowCase() STDERR: v8#29 0x56540a7afdd6 blink::V8PerContextData::ConstructorForTypeSlowCase() STDERR: v8#30 0x56540a7afdd6 blink::V8PerContextData::ConstructorForTypeSlowCase() STDERR: v8#31 0x56540a7afcb4 blink::V8PerContextData::CreateWrapperFromCacheSlowCase() STDERR: v8#32 0x56540a7aef73 blink::V8DOMWrapper::CreateWrapper() STDERR: v8#33 0x56540a7abf6b blink::ScriptWrappable::Wrap() STDERR: v8#34 0x56540a677199 blink::V8Document::documentElementAttributeGetterCallback() STDERR: v8#35 0x565407a0aec3 v8::internal::FunctionCallbackArguments::Call() STDERR: v8#36 0x565407a097be v8::internal::(anonymous namespace)::HandleApiCallHelper<>() STDERR: v8#37 0x565407a0877b v8::internal::Builtins::InvokeApiFunction() STDERR: v8#38 0x565407fe785a v8::internal::Object::GetPropertyWithAccessor() STDERR: v8#39 0x565407fe697e v8::internal::Object::GetProperty() STDERR: v8#40 0x565407ec8c71 v8::internal::LoadIC::Load() STDERR: v8#41 0x565407ed6401 v8::internal::__RT_impl_Runtime_LoadIC_Miss() STDERR: v8#42 0x5654087593f2 <unknown> STDERR: [16162:16185:1122/143518.356897:WARNING:crash_handler_host_linux.cc(341)] Could not translate tid, attempt = 1 retry ... Original change's description: > [heap] Improve embedder tracing during incremental marking > > Add a path into embedder tracing on allocation. This is safe as as Blink > is not allowed to call into V8 during object construction. > > Bug: chromium:843903 > Change-Id: I5af053c3169f5a33778ebce5d7c5c43e4efb1aa4 > Reviewed-on: https://chromium-review.googlesource.com/c/1348749 > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57757} TBR=ulan@chromium.org,mlippautz@chromium.org Change-Id: Ide2c0b284b52bee17573adcc89f14be4e40dab91 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:843903 Reviewed-on: https://chromium-review.googlesource.com/c/1349189 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#57759}
peterwmwong
pushed a commit
that referenced
this pull request
Dec 9, 2018
…pendent." This reverts commit 38cd61d. Reason for revert: Layout test http/tests/asmjs/asm-warnings.html fails due to missing context. See https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_rel_ng/238991 crash log for renderer (pid <unknown>): STDOUT: <empty> STDERR: [1:1:1123/024436.020348:FATAL:script_state.h(140)] Check failed: !context.IsEmpty(). STDERR: #0 0x5556817298df base::debug::StackTrace::StackTrace() STDERR: #1 0x55568167b5fb logging::LogMessage::~LogMessage() STDERR: #2 0x55568154ed45 blink::ScriptState::From() STDERR: #3 0x555683047aa9 blink::V8Initializer::MessageHandlerInMainThread() STDERR: v8#4 0x5556801793c8 v8::internal::MessageHandler::ReportMessageNoExceptions() STDERR: v8#5 0x555680178652 v8::internal::MessageHandler::ReportMessage() STDERR: v8#6 0x5556802c2563 v8::internal::PendingCompilationErrorHandler::ReportWarnings() STDERR: v8#7 0x55567fc8bcd3 v8::internal::(anonymous namespace)::FinalizeUnoptimizedCode() STDERR: v8#8 0x55567fc8b668 v8::internal::Compiler::Compile() STDERR: v8#9 0x55567fc8be6b v8::internal::Compiler::Compile() STDERR: v8#10 0x55568033a36f v8::internal::__RT_impl_Runtime_CompileLazy() STDERR: v8#11 0x5556808f2492 <unknown> STDERR: STDERR: [25209:25254:1123/024436.075700:WARNING:crash_handler_host_linux.cc(341)] Could not translate tid, attempt = 1 retry ... The issue seems to be that we do require the context for when we report a compile error when finalizing the compilation. Original change's description: > [Compiler] Ensure unoptimized code generation is context independent. > > Now that Asm.js code is also context independent, move code to ensure context independence > from BytecodeGenerator to FinalizeUnoptimizedCode. > > Change-Id: I7738eb3b347ea82764ecd3b5548dc82cb06d2f4e > Reviewed-on: https://chromium-review.googlesource.com/c/1347483 > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57730} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Iaa15e608b35a3396ba51a03f996c6de1330f0016 Reviewed-on: https://chromium-review.googlesource.com/c/1349236 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#57785}
peterwmwong
pushed a commit
that referenced
this pull request
Dec 9, 2018
Two Fixes included to make V8 build work for Windows ARM64. 1. Don't emit ".def" and related macros to define function beginning, because they are invalid for Windows ARM64. 2. Set alignment of data section to 8 which is required for instruction which loads element from v8_Default_embedded_blob_. Version 7.2.479 Performance and stability improvements on all platforms. TBR=v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com Change-Id: I0bfea5dd8ed6c1340d11c13dcc2e492e7b22aa8c Reviewed-on: https://chromium-review.googlesource.com/c/1352210 Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Cr-Original-Commit-Position: refs/heads/7.2.479@{#1} Cr-Original-Branched-From: a8152aa-refs/heads/master@{#57863} Bug: chromium:893460 Reviewed-on: https://chromium-review.googlesource.com/c/1352791 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Tom Tan <Tom.Tan@microsoft.com> Cr-Commit-Position: refs/heads/master@{#57915}
peterwmwong
pushed a commit
that referenced
this pull request
May 25, 2019
Improve code generation for stores with write barriers slightly by using the
assembler's dedicated scratch registers (x16 and x17 on Arm64, ip on Arm)
instead of allocating temporaries.
To do this, we've done two things:
- Use ip as a scratch register when loading page flags.
- TurboAssembler::CallRecordWriteStub() now takes the offset of the slot
that's written to rather than its address, removing the need to allocate a
temporary register for it.
In essence, we've gone from:
```
;; Do the store.
stur x19, [x9, v8#15]
;; Check *destination* object page flags and jump out-of-line.
and x4, x9, #0xfffffffffff80000
ldr x4, [x4, v8#8]
tbnz x4, #2, #+0x1e7c
| ;; Check *source* object page flags.
| `-> and x4, x19, #0xfffffffffff80000
| ldr x4, [xM, v8#8]
|,--- tbz x4, #1, #-0x1e80
| ;; Compute address of slot.
| add x5, x9, #0xf (15)
| ;; Setup arguments to RecordWrite
| stp x2, x3, [sp, #-32]!
| stp x4, lr, [sp, v8#16]
| stp x0, x1, [sp, #-16]!
| mov x0, x9 ;; Object address in x9
| mov x1, x5 ;; Slot address in x5
| movz x2, #0x0
| movz x3, #0x100000000
| ;; Call RecordWrite
| ldr x16, pc+2056
| blr x16
```
Which allocates x4 and x5 as temporaries.
To:
```
stur x19, [x9, v8#15]
and x16, x9, #0xfffffffffff80000 ;; Using x16 instead of allocating x4.
ldr x16, [x16, v8#8]
tbnz x16, #2, #+0x1e7c
| `-> and x16, x19, #0xfffffffffff80000
| ldr x16, [xM, v8#8]
|,--- tbz x16, #1, #-0x1e80
| stp x2, x3, [sp, #-32]!
| stp x4, lr, [sp, v8#16]
| stp x0, x1, [sp, #-16]!
| mov x0, x9 ;; Object address still in x9.
| add x1, x9, #0xf (15) ;; Compute the slot address directly.
| movz x2, #0x0
| movz x3, #0x100000000
| ldr x16, pc+2056
| blr x16
```
Finally, `RecordWriteField()` does not need an extra scratch register anymore.
Change-Id: Icb71310e7b8ab1ca83ced250851456166b337d00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1505793
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61153}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.