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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 9 years, 1 month 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 void FastNewClosureStub::Generate(MacroAssembler* masm) { 65 void FastNewClosureStub::Generate(MacroAssembler* masm) {
66 // Create a new closure from the given function info in new 66 // Create a new closure from the given function info in new
67 // space. Set the context to the current context in esi. 67 // space. Set the context to the current context in esi.
68 Label gc; 68 Label gc;
69 __ AllocateInNewSpace(JSFunction::kSize, eax, ebx, ecx, &gc, TAG_OBJECT); 69 __ AllocateInNewSpace(JSFunction::kSize, eax, ebx, ecx, &gc, TAG_OBJECT);
70 70
71 // Get the function info from the stack. 71 // Get the function info from the stack.
72 __ mov(edx, Operand(esp, 1 * kPointerSize)); 72 __ mov(edx, Operand(esp, 1 * kPointerSize));
73 73
74 int map_index = strict_mode_ == kStrictMode 74 int map_index = (language_mode_ == CLASSIC_MODE)
75 ? Context::STRICT_MODE_FUNCTION_MAP_INDEX 75 ? Context::FUNCTION_MAP_INDEX
76 : Context::FUNCTION_MAP_INDEX; 76 : Context::STRICT_MODE_FUNCTION_MAP_INDEX;
77 77
78 // Compute the function map in the current global context and set that 78 // Compute the function map in the current global context and set that
79 // as the map of the allocated object. 79 // as the map of the allocated object.
80 __ mov(ecx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); 80 __ mov(ecx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
81 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalContextOffset)); 81 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalContextOffset));
82 __ mov(ecx, Operand(ecx, Context::SlotOffset(map_index))); 82 __ mov(ecx, Operand(ecx, Context::SlotOffset(map_index)));
83 __ mov(FieldOperand(eax, JSObject::kMapOffset), ecx); 83 __ mov(FieldOperand(eax, JSObject::kMapOffset), ecx);
84 84
85 // Initialize the rest of the function. We don't have to update the 85 // Initialize the rest of the function. We don't have to update the
86 // write barrier because the allocated object is in new space. 86 // write barrier because the allocated object is in new space.
(...skipping 7029 matching lines...) Expand 10 before | Expand all | Expand 10 after
7116 __ bind(&element_done); 7116 __ bind(&element_done);
7117 __ ret(0); 7117 __ ret(0);
7118 } 7118 }
7119 } 7119 }
7120 7120
7121 #undef __ 7121 #undef __
7122 7122
7123 } } // namespace v8::internal 7123 } } // namespace v8::internal
7124 7124
7125 #endif // V8_TARGET_ARCH_IA32 7125 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698