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

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

Issue 9139051: Cosmetic changes ("set up" is a verb, "setup" is a noun). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 | « src/x64/lithium-codegen-x64.h ('k') | src/x64/macro-assembler-x64.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 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 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2629 RecordPosition(pointers->position()); 2629 RecordPosition(pointers->position());
2630 2630
2631 // Invoke function. 2631 // Invoke function.
2632 __ SetCallKind(rcx, call_kind); 2632 __ SetCallKind(rcx, call_kind);
2633 if (*function == *info()->closure()) { 2633 if (*function == *info()->closure()) {
2634 __ CallSelf(); 2634 __ CallSelf();
2635 } else { 2635 } else {
2636 __ call(FieldOperand(rdi, JSFunction::kCodeEntryOffset)); 2636 __ call(FieldOperand(rdi, JSFunction::kCodeEntryOffset));
2637 } 2637 }
2638 2638
2639 // Setup deoptimization. 2639 // Set up deoptimization.
2640 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0); 2640 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0);
2641 2641
2642 // Restore context. 2642 // Restore context.
2643 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 2643 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
2644 } 2644 }
2645 2645
2646 2646
2647 void LCodeGen::DoCallConstantFunction(LCallConstantFunction* instr) { 2647 void LCodeGen::DoCallConstantFunction(LCallConstantFunction* instr) {
2648 ASSERT(ToRegister(instr->result()).is(rax)); 2648 ASSERT(ToRegister(instr->result()).is(rax));
2649 __ LoadHeapObject(rdi, instr->function()); 2649 __ LoadHeapObject(rdi, instr->function());
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3856 __ movq(rbx, FieldOperand(rax, HeapObject::kMapOffset)); 3856 __ movq(rbx, FieldOperand(rax, HeapObject::kMapOffset));
3857 // Load the map's "bit field 2". 3857 // Load the map's "bit field 2".
3858 __ movb(rbx, FieldOperand(rbx, Map::kBitField2Offset)); 3858 __ movb(rbx, FieldOperand(rbx, Map::kBitField2Offset));
3859 // Retrieve elements_kind from bit field 2. 3859 // Retrieve elements_kind from bit field 2.
3860 __ and_(rbx, Immediate(Map::kElementsKindMask)); 3860 __ and_(rbx, Immediate(Map::kElementsKindMask));
3861 __ cmpb(rbx, Immediate(boilerplate_elements_kind << 3861 __ cmpb(rbx, Immediate(boilerplate_elements_kind <<
3862 Map::kElementsKindShift)); 3862 Map::kElementsKindShift));
3863 DeoptimizeIf(not_equal, instr->environment()); 3863 DeoptimizeIf(not_equal, instr->environment());
3864 } 3864 }
3865 3865
3866 // Setup the parameters to the stub/runtime call. 3866 // Set up the parameters to the stub/runtime call.
3867 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 3867 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
3868 __ push(FieldOperand(rax, JSFunction::kLiteralsOffset)); 3868 __ push(FieldOperand(rax, JSFunction::kLiteralsOffset));
3869 __ Push(Smi::FromInt(instr->hydrogen()->literal_index())); 3869 __ Push(Smi::FromInt(instr->hydrogen()->literal_index()));
3870 // Boilerplate already exists, constant elements are never accessed. 3870 // Boilerplate already exists, constant elements are never accessed.
3871 // Pass an empty fixed array. 3871 // Pass an empty fixed array.
3872 __ Push(Handle<FixedArray>(heap->empty_fixed_array())); 3872 __ Push(Handle<FixedArray>(heap->empty_fixed_array()));
3873 3873
3874 // Pick the right runtime function or stub to call. 3874 // Pick the right runtime function or stub to call.
3875 int length = instr->hydrogen()->length(); 3875 int length = instr->hydrogen()->length();
3876 if (instr->hydrogen()->IsCopyOnWrite()) { 3876 if (instr->hydrogen()->IsCopyOnWrite()) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3957 __ LoadHeapObject(rbx, instr->hydrogen()->boilerplate()); 3957 __ LoadHeapObject(rbx, instr->hydrogen()->boilerplate());
3958 EmitDeepCopy(instr->hydrogen()->boilerplate(), rax, rbx, &offset); 3958 EmitDeepCopy(instr->hydrogen()->boilerplate(), rax, rbx, &offset);
3959 ASSERT_EQ(size, offset); 3959 ASSERT_EQ(size, offset);
3960 } 3960 }
3961 3961
3962 3962
3963 void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) { 3963 void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) {
3964 Handle<FixedArray> constant_properties = 3964 Handle<FixedArray> constant_properties =
3965 instr->hydrogen()->constant_properties(); 3965 instr->hydrogen()->constant_properties();
3966 3966
3967 // Setup the parameters to the stub/runtime call. 3967 // Set up the parameters to the stub/runtime call.
3968 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 3968 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
3969 __ push(FieldOperand(rax, JSFunction::kLiteralsOffset)); 3969 __ push(FieldOperand(rax, JSFunction::kLiteralsOffset));
3970 __ Push(Smi::FromInt(instr->hydrogen()->literal_index())); 3970 __ Push(Smi::FromInt(instr->hydrogen()->literal_index()));
3971 __ Push(constant_properties); 3971 __ Push(constant_properties);
3972 int flags = instr->hydrogen()->fast_elements() 3972 int flags = instr->hydrogen()->fast_elements()
3973 ? ObjectLiteral::kFastElements 3973 ? ObjectLiteral::kFastElements
3974 : ObjectLiteral::kNoFlags; 3974 : ObjectLiteral::kNoFlags;
3975 flags |= instr->hydrogen()->has_function() 3975 flags |= instr->hydrogen()->has_function()
3976 ? ObjectLiteral::kHasFunction 3976 ? ObjectLiteral::kHasFunction
3977 : ObjectLiteral::kNoFlags; 3977 : ObjectLiteral::kNoFlags;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4337 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4337 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4338 ASSERT(osr_pc_offset_ == -1); 4338 ASSERT(osr_pc_offset_ == -1);
4339 osr_pc_offset_ = masm()->pc_offset(); 4339 osr_pc_offset_ = masm()->pc_offset();
4340 } 4340 }
4341 4341
4342 #undef __ 4342 #undef __
4343 4343
4344 } } // namespace v8::internal 4344 } } // namespace v8::internal
4345 4345
4346 #endif // V8_TARGET_ARCH_X64 4346 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698