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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 1481353002: X87: [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3441 matching lines...) Expand 10 before | Expand all | Expand 10 after
3452 3452
3453 // The receiver should be a JS object. 3453 // The receiver should be a JS object.
3454 __ test(receiver, Immediate(kSmiTagMask)); 3454 __ test(receiver, Immediate(kSmiTagMask));
3455 DeoptimizeIf(equal, instr, Deoptimizer::kSmi); 3455 DeoptimizeIf(equal, instr, Deoptimizer::kSmi);
3456 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); 3456 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch);
3457 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); 3457 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject);
3458 3458
3459 __ jmp(&receiver_ok, Label::kNear); 3459 __ jmp(&receiver_ok, Label::kNear);
3460 __ bind(&global_object); 3460 __ bind(&global_object);
3461 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); 3461 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset));
3462 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); 3462 __ mov(receiver, ContextOperand(receiver, Context::NATIVE_CONTEXT_INDEX));
3463 __ mov(receiver, Operand(receiver, global_offset)); 3463 __ mov(receiver, ContextOperand(receiver, Context::GLOBAL_PROXY_INDEX));
3464 const int proxy_offset = JSGlobalObject::kGlobalProxyOffset;
3465 __ mov(receiver, FieldOperand(receiver, proxy_offset));
3466 __ bind(&receiver_ok); 3464 __ bind(&receiver_ok);
3467 } 3465 }
3468 3466
3469 3467
3470 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { 3468 void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
3471 Register receiver = ToRegister(instr->receiver()); 3469 Register receiver = ToRegister(instr->receiver());
3472 Register function = ToRegister(instr->function()); 3470 Register function = ToRegister(instr->function());
3473 Register length = ToRegister(instr->length()); 3471 Register length = ToRegister(instr->length());
3474 Register elements = ToRegister(instr->elements()); 3472 Register elements = ToRegister(instr->elements());
3475 DCHECK(receiver.is(eax)); // Used for parameter count. 3473 DCHECK(receiver.is(eax)); // Used for parameter count.
(...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after
6151 RecordSafepoint(Safepoint::kNoLazyDeopt); 6149 RecordSafepoint(Safepoint::kNoLazyDeopt);
6152 } 6150 }
6153 6151
6154 6152
6155 #undef __ 6153 #undef __
6156 6154
6157 } // namespace internal 6155 } // namespace internal
6158 } // namespace v8 6156 } // namespace v8
6159 6157
6160 #endif // V8_TARGET_ARCH_X87 6158 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698