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

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 146863002: A64: Fix LWrapReceiver for strict mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5366 matching lines...) Expand 10 before | Expand all | Expand 10 after
5377 Register receiver = ToRegister(instr->receiver()); 5377 Register receiver = ToRegister(instr->receiver());
5378 Register function = ToRegister(instr->function()); 5378 Register function = ToRegister(instr->function());
5379 Register result = ToRegister(instr->result()); 5379 Register result = ToRegister(instr->result());
5380 Register temp = ToRegister(instr->temp()); 5380 Register temp = ToRegister(instr->temp());
5381 5381
5382 // If the receiver is null or undefined, we have to pass the global object as 5382 // If the receiver is null or undefined, we have to pass the global object as
5383 // a receiver to normal functions. Values have to be passed unchanged to 5383 // a receiver to normal functions. Values have to be passed unchanged to
5384 // builtins and strict-mode functions. 5384 // builtins and strict-mode functions.
5385 Label global_object, done, deopt; 5385 Label global_object, done, deopt;
5386 5386
5387 // Do not transform the receiver to object for strict mode functions.
5388 __ Ldr(temp, FieldMemOperand(function, 5387 __ Ldr(temp, FieldMemOperand(function,
5389 JSFunction::kSharedFunctionInfoOffset)); 5388 JSFunction::kSharedFunctionInfoOffset));
5390 __ Ldr(temp, 5389
5391 UntagSmiFieldMemOperand(temp, 5390 // CompilerHints is an int32 field. See objects.h.
5392 SharedFunctionInfo::kCompilerHintsOffset)); 5391 __ Ldr(temp.W(),
5392 FieldMemOperand(temp, SharedFunctionInfo::kCompilerHintsOffset));
5393
5394 // Do not transform the receiver to object for strict mode functions.
5393 __ Tbnz(temp, SharedFunctionInfo::kStrictModeFunction, &done); 5395 __ Tbnz(temp, SharedFunctionInfo::kStrictModeFunction, &done);
5394 5396
5395 // Do not transform the receiver to object for builtins. 5397 // Do not transform the receiver to object for builtins.
5396 __ Tbnz(temp, SharedFunctionInfo::kNative, &done); 5398 __ Tbnz(temp, SharedFunctionInfo::kNative, &done);
5397 5399
5398 // Normal function. Replace undefined or null with global receiver. 5400 // Normal function. Replace undefined or null with global receiver.
5399 __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, &global_object); 5401 __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, &global_object);
5400 __ JumpIfRoot(receiver, Heap::kUndefinedValueRootIndex, &global_object); 5402 __ JumpIfRoot(receiver, Heap::kUndefinedValueRootIndex, &global_object);
5401 5403
5402 // Deoptimize if the receiver is not a JS object. 5404 // Deoptimize if the receiver is not a JS object.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
5441 __ Bind(&out_of_object); 5443 __ Bind(&out_of_object);
5442 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5444 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5443 // Index is equal to negated out of object property index plus 1. 5445 // Index is equal to negated out of object property index plus 1.
5444 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5446 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5445 __ Ldr(result, FieldMemOperand(result, 5447 __ Ldr(result, FieldMemOperand(result,
5446 FixedArray::kHeaderSize - kPointerSize)); 5448 FixedArray::kHeaderSize - kPointerSize));
5447 __ Bind(&done); 5449 __ Bind(&done);
5448 } 5450 }
5449 5451
5450 } } // namespace v8::internal 5452 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698