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

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

Issue 995013005: Simplify pending message script handling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix hardcoded constant. Created 5 years, 9 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
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/assembler.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5330 matching lines...) Expand 10 before | Expand all | Expand 10 after
5341 __ Ldr(x10, MemOperand(x10)); 5341 __ Ldr(x10, MemOperand(x10));
5342 5342
5343 ExternalReference has_pending_message = 5343 ExternalReference has_pending_message =
5344 ExternalReference::address_of_has_pending_message(isolate()); 5344 ExternalReference::address_of_has_pending_message(isolate());
5345 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof) 5345 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof)
5346 __ Mov(x11, has_pending_message); 5346 __ Mov(x11, has_pending_message);
5347 __ Ldrb(x11, MemOperand(x11)); 5347 __ Ldrb(x11, MemOperand(x11));
5348 __ SmiTag(x11); 5348 __ SmiTag(x11);
5349 5349
5350 __ Push(x10, x11); 5350 __ Push(x10, x11);
5351
5352 ExternalReference pending_message_script =
5353 ExternalReference::address_of_pending_message_script(isolate());
5354 __ Mov(x10, pending_message_script);
5355 __ Ldr(x10, MemOperand(x10));
5356 __ Push(x10);
5357 } 5351 }
5358 5352
5359 5353
5360 void FullCodeGenerator::ExitFinallyBlock() { 5354 void FullCodeGenerator::ExitFinallyBlock() {
5361 ASM_LOCATION("FullCodeGenerator::ExitFinallyBlock"); 5355 ASM_LOCATION("FullCodeGenerator::ExitFinallyBlock");
5362 DCHECK(!result_register().is(x10)); 5356 DCHECK(!result_register().is(x10));
5363 5357
5364 // Restore pending message from stack. 5358 // Restore pending message from stack.
5365 __ Pop(x10, x11, x12); 5359 __ Pop(x10, x11);
5366 ExternalReference pending_message_script = 5360 __ SmiUntag(x10);
5367 ExternalReference::address_of_pending_message_script(isolate());
5368 __ Mov(x13, pending_message_script);
5369 __ Str(x10, MemOperand(x13));
5370
5371 __ SmiUntag(x11);
5372 ExternalReference has_pending_message = 5361 ExternalReference has_pending_message =
5373 ExternalReference::address_of_has_pending_message(isolate()); 5362 ExternalReference::address_of_has_pending_message(isolate());
5374 __ Mov(x13, has_pending_message); 5363 __ Mov(x13, has_pending_message);
5375 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof) 5364 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof)
5376 __ Strb(x11, MemOperand(x13)); 5365 __ Strb(x10, MemOperand(x13));
5377 5366
5378 ExternalReference pending_message_obj = 5367 ExternalReference pending_message_obj =
5379 ExternalReference::address_of_pending_message_obj(isolate()); 5368 ExternalReference::address_of_pending_message_obj(isolate());
5380 __ Mov(x13, pending_message_obj); 5369 __ Mov(x13, pending_message_obj);
5381 __ Str(x12, MemOperand(x13)); 5370 __ Str(x11, MemOperand(x13));
5382 5371
5383 // Restore result register and cooked return address from the stack. 5372 // Restore result register and cooked return address from the stack.
5384 __ Pop(x10, result_register()); 5373 __ Pop(x10, result_register());
5385 5374
5386 // Uncook the return address (see EnterFinallyBlock). 5375 // Uncook the return address (see EnterFinallyBlock).
5387 __ SmiUntag(x10); 5376 __ SmiUntag(x10);
5388 __ Add(x11, x10, Operand(masm_->CodeObject())); 5377 __ Add(x11, x10, Operand(masm_->CodeObject()));
5389 __ Br(x11); 5378 __ Br(x11);
5390 } 5379 }
5391 5380
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
5515 return previous_; 5504 return previous_;
5516 } 5505 }
5517 5506
5518 5507
5519 #undef __ 5508 #undef __
5520 5509
5521 5510
5522 } } // namespace v8::internal 5511 } } // namespace v8::internal
5523 5512
5524 #endif // V8_TARGET_ARCH_ARM64 5513 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698