Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 2227763003: [turbofan] Rewrite ToObject as TurboFan stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment with ES6 section Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. 953 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4.
954 Label convert, done_convert; 954 Label convert, done_convert;
955 __ JumpIfSmi(rax, &convert, Label::kNear); 955 __ JumpIfSmi(rax, &convert, Label::kNear);
956 __ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rcx); 956 __ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rcx);
957 __ j(above_equal, &done_convert, Label::kNear); 957 __ j(above_equal, &done_convert, Label::kNear);
958 __ CompareRoot(rax, Heap::kNullValueRootIndex); 958 __ CompareRoot(rax, Heap::kNullValueRootIndex);
959 __ j(equal, &exit); 959 __ j(equal, &exit);
960 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex); 960 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
961 __ j(equal, &exit); 961 __ j(equal, &exit);
962 __ bind(&convert); 962 __ bind(&convert);
963 __ Push(rsi);
963 ToObjectStub stub(isolate()); 964 ToObjectStub stub(isolate());
964 __ CallStub(&stub); 965 __ CallStub(&stub);
966 __ Pop(rsi);
965 __ bind(&done_convert); 967 __ bind(&done_convert);
966 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); 968 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER);
967 __ Push(rax); 969 __ Push(rax);
968 970
969 // Check cache validity in generated code. If we cannot guarantee cache 971 // Check cache validity in generated code. If we cannot guarantee cache
970 // validity, call the runtime system to check cache validity or get the 972 // validity, call the runtime system to check cache validity or get the
971 // property names in a fixed array. Note: Proxies never have an enum cache, 973 // property names in a fixed array. Note: Proxies never have an enum cache,
972 // so will always take the slow path. 974 // so will always take the slow path.
973 Label call_runtime; 975 Label call_runtime;
974 __ CheckEnumCache(&call_runtime); 976 __ CheckEnumCache(&call_runtime);
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
3661 DCHECK_EQ( 3663 DCHECK_EQ(
3662 isolate->builtins()->OnStackReplacement()->entry(), 3664 isolate->builtins()->OnStackReplacement()->entry(),
3663 Assembler::target_address_at(call_target_address, unoptimized_code)); 3665 Assembler::target_address_at(call_target_address, unoptimized_code));
3664 return ON_STACK_REPLACEMENT; 3666 return ON_STACK_REPLACEMENT;
3665 } 3667 }
3666 3668
3667 } // namespace internal 3669 } // namespace internal
3668 } // namespace v8 3670 } // namespace v8
3669 3671
3670 #endif // V8_TARGET_ARCH_X64 3672 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698