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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 466033: Fast codegen: Working break and continue. (Closed)
Patch Set: Fixed bug in ARM PopTryHandler, merge with head. Created 11 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 push(Immediate(StackHandler::ENTRY)); 497 push(Immediate(StackHandler::ENTRY));
498 push(Immediate(0)); // NULL frame pointer. 498 push(Immediate(0)); // NULL frame pointer.
499 } 499 }
500 // Save the current handler as the next handler. 500 // Save the current handler as the next handler.
501 push(Operand::StaticVariable(ExternalReference(Top::k_handler_address))); 501 push(Operand::StaticVariable(ExternalReference(Top::k_handler_address)));
502 // Link this handler as the new current one. 502 // Link this handler as the new current one.
503 mov(Operand::StaticVariable(ExternalReference(Top::k_handler_address)), esp); 503 mov(Operand::StaticVariable(ExternalReference(Top::k_handler_address)), esp);
504 } 504 }
505 505
506 506
507 void MacroAssembler::PopTryHandler() {
508 ASSERT_EQ(0, StackHandlerConstants::kNextOffset);
509 pop(Operand::StaticVariable(ExternalReference(Top::k_handler_address)));
510 add(Operand(esp), Immediate(StackHandlerConstants::kSize - kPointerSize));
511 }
512
513
507 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg, 514 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
508 JSObject* holder, Register holder_reg, 515 JSObject* holder, Register holder_reg,
509 Register scratch, 516 Register scratch,
510 Label* miss) { 517 Label* miss) {
511 // Make sure there's no overlap between scratch and the other 518 // Make sure there's no overlap between scratch and the other
512 // registers. 519 // registers.
513 ASSERT(!scratch.is(object_reg) && !scratch.is(holder_reg)); 520 ASSERT(!scratch.is(object_reg) && !scratch.is(holder_reg));
514 521
515 // Keep track of the current object in register reg. 522 // Keep track of the current object in register reg.
516 Register reg = object_reg; 523 Register reg = object_reg;
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 } 1350 }
1344 } 1351 }
1345 1352
1346 1353
1347 1354
1348 void MacroAssembler::Ret() { 1355 void MacroAssembler::Ret() {
1349 ret(0); 1356 ret(0);
1350 } 1357 }
1351 1358
1352 1359
1360 void MacroAssembler::Drop(int stack_elements) {
1361 if (stack_elements > 0) {
1362 add(Operand(esp), Immediate(stack_elements * kPointerSize));
1363 }
1364 }
1365
1366
1367 void MacroAssembler::Move(Register dst, Handle<Object> value) {
1368 mov(dst, value);
1369 }
1370
1371
1353 void MacroAssembler::SetCounter(StatsCounter* counter, int value) { 1372 void MacroAssembler::SetCounter(StatsCounter* counter, int value) {
1354 if (FLAG_native_code_counters && counter->Enabled()) { 1373 if (FLAG_native_code_counters && counter->Enabled()) {
1355 mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value)); 1374 mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value));
1356 } 1375 }
1357 } 1376 }
1358 1377
1359 1378
1360 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) { 1379 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) {
1361 ASSERT(value > 0); 1380 ASSERT(value > 0);
1362 if (FLAG_native_code_counters && counter->Enabled()) { 1381 if (FLAG_native_code_counters && counter->Enabled()) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 // Indicate that code has changed. 1456 // Indicate that code has changed.
1438 CPU::FlushICache(address_, size_); 1457 CPU::FlushICache(address_, size_);
1439 1458
1440 // Check that the code was patched as expected. 1459 // Check that the code was patched as expected.
1441 ASSERT(masm_.pc_ == address_ + size_); 1460 ASSERT(masm_.pc_ == address_ + size_);
1442 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1461 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1443 } 1462 }
1444 1463
1445 1464
1446 } } // namespace v8::internal 1465 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698