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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. 959 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4.
960 Label convert, done_convert; 960 Label convert, done_convert;
961 __ JumpIfSmi(r3, &convert); 961 __ JumpIfSmi(r3, &convert);
962 __ CompareObjectType(r3, r4, r4, FIRST_JS_RECEIVER_TYPE); 962 __ CompareObjectType(r3, r4, r4, FIRST_JS_RECEIVER_TYPE);
963 __ bge(&done_convert); 963 __ bge(&done_convert);
964 __ CompareRoot(r3, Heap::kNullValueRootIndex); 964 __ CompareRoot(r3, Heap::kNullValueRootIndex);
965 __ beq(&exit); 965 __ beq(&exit);
966 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); 966 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex);
967 __ beq(&exit); 967 __ beq(&exit);
968 __ bind(&convert); 968 __ bind(&convert);
969 __ Push(cp);
969 ToObjectStub stub(isolate()); 970 ToObjectStub stub(isolate());
970 __ CallStub(&stub); 971 __ CallStub(&stub);
972 __ Pop(cp);
971 __ bind(&done_convert); 973 __ bind(&done_convert);
972 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); 974 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER);
973 __ push(r3); 975 __ push(r3);
974 976
975 // Check cache validity in generated code. If we cannot guarantee cache 977 // Check cache validity in generated code. If we cannot guarantee cache
976 // validity, call the runtime system to check cache validity or get the 978 // validity, call the runtime system to check cache validity or get the
977 // property names in a fixed array. Note: Proxies never have an enum cache, 979 // property names in a fixed array. Note: Proxies never have an enum cache,
978 // so will always take the slow path. 980 // so will always take the slow path.
979 Label call_runtime; 981 Label call_runtime;
980 __ CheckEnumCache(&call_runtime); 982 __ CheckEnumCache(&call_runtime);
(...skipping 2796 matching lines...) Expand 10 before | Expand all | Expand 10 after
3777 3779
3778 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3780 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3779 3781
3780 DCHECK(interrupt_address == 3782 DCHECK(interrupt_address ==
3781 isolate->builtins()->OnStackReplacement()->entry()); 3783 isolate->builtins()->OnStackReplacement()->entry());
3782 return ON_STACK_REPLACEMENT; 3784 return ON_STACK_REPLACEMENT;
3783 } 3785 }
3784 } // namespace internal 3786 } // namespace internal
3785 } // namespace v8 3787 } // namespace v8
3786 #endif // V8_TARGET_ARCH_PPC 3788 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698