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

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

Issue 153923005: A64: Synchronize with r17525. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.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 // 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 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #if V8_TARGET_ARCH_IA32 30 #if V8_TARGET_ARCH_IA32
31 31
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "codegen.h" 33 #include "codegen.h"
34 #include "cpu-profiler.h" 34 #include "cpu-profiler.h"
35 #include "debug.h" 35 #include "debug.h"
36 #include "isolate-inl.h"
36 #include "runtime.h" 37 #include "runtime.h"
37 #include "serialize.h" 38 #include "serialize.h"
38 39
39 namespace v8 { 40 namespace v8 {
40 namespace internal { 41 namespace internal {
41 42
42 // ------------------------------------------------------------------------- 43 // -------------------------------------------------------------------------
43 // MacroAssembler implementation. 44 // MacroAssembler implementation.
44 45
45 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) 46 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 1016
1016 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { 1017 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
1017 if (frame_mode == BUILD_STUB_FRAME) { 1018 if (frame_mode == BUILD_STUB_FRAME) {
1018 push(ebp); // Caller's frame pointer. 1019 push(ebp); // Caller's frame pointer.
1019 mov(ebp, esp); 1020 mov(ebp, esp);
1020 push(esi); // Callee's context. 1021 push(esi); // Callee's context.
1021 push(Immediate(Smi::FromInt(StackFrame::STUB))); 1022 push(Immediate(Smi::FromInt(StackFrame::STUB)));
1022 } else { 1023 } else {
1023 PredictableCodeSizeScope predictible_code_size_scope(this, 1024 PredictableCodeSizeScope predictible_code_size_scope(this,
1024 kNoCodeAgeSequenceLength); 1025 kNoCodeAgeSequenceLength);
1025 if (FLAG_optimize_for_size && FLAG_age_code) { 1026 if (isolate()->IsCodePreAgingActive()) {
1026 // Pre-age the code. 1027 // Pre-age the code.
1027 call(isolate()->builtins()->MarkCodeAsExecutedOnce(), 1028 call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
1028 RelocInfo::CODE_AGE_SEQUENCE); 1029 RelocInfo::CODE_AGE_SEQUENCE);
1029 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); 1030 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength);
1030 } else { 1031 } else {
1031 push(ebp); // Caller's frame pointer. 1032 push(ebp); // Caller's frame pointer.
1032 mov(ebp, esp); 1033 mov(ebp, esp);
1033 push(esi); // Callee's context. 1034 push(esi); // Callee's context.
1034 push(edi); // Callee's JS function. 1035 push(edi); // Callee's JS function.
1035 } 1036 }
(...skipping 2507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3543 JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag)); 3544 JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag));
3544 cmp(scratch_reg, Immediate(new_space_start)); 3545 cmp(scratch_reg, Immediate(new_space_start));
3545 j(less, no_memento_found); 3546 j(less, no_memento_found);
3546 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); 3547 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top));
3547 j(greater, no_memento_found); 3548 j(greater, no_memento_found);
3548 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), 3549 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize),
3549 Immediate(isolate()->factory()->allocation_memento_map())); 3550 Immediate(isolate()->factory()->allocation_memento_map()));
3550 } 3551 }
3551 3552
3552 3553
3554 void MacroAssembler::JumpIfDictionaryInPrototypeChain(
3555 Register object,
3556 Register scratch0,
3557 Register scratch1,
3558 Label* found) {
3559 ASSERT(!scratch1.is(scratch0));
3560 Factory* factory = isolate()->factory();
3561 Register current = scratch0;
3562 Label loop_again;
3563
3564 // scratch contained elements pointer.
3565 mov(current, object);
3566
3567 // Loop based on the map going up the prototype chain.
3568 bind(&loop_again);
3569 mov(current, FieldOperand(current, HeapObject::kMapOffset));
3570 mov(scratch1, FieldOperand(current, Map::kBitField2Offset));
3571 and_(scratch1, Map::kElementsKindMask);
3572 shr(scratch1, Map::kElementsKindShift);
3573 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS));
3574 j(equal, found);
3575 mov(current, FieldOperand(current, Map::kPrototypeOffset));
3576 cmp(current, Immediate(factory->null_value()));
3577 j(not_equal, &loop_again);
3578 }
3579
3553 } } // namespace v8::internal 3580 } } // namespace v8::internal
3554 3581
3555 #endif // V8_TARGET_ARCH_IA32 3582 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698