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

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

Issue 8540005: Revert "Add a level of indirection to exception handler addresses." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « src/code-stubs.h ('k') | src/frames.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 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 CodeDesc desc; 112 CodeDesc desc;
113 masm.GetCode(&desc); 113 masm.GetCode(&desc);
114 114
115 // Copy the generated code into a heap object. 115 // Copy the generated code into a heap object.
116 Code::Flags flags = Code::ComputeFlags( 116 Code::Flags flags = Code::ComputeFlags(
117 static_cast<Code::Kind>(GetCodeKind()), 117 static_cast<Code::Kind>(GetCodeKind()),
118 GetICState()); 118 GetICState());
119 Handle<Code> new_object = factory->NewCode( 119 Handle<Code> new_object = factory->NewCode(
120 desc, flags, masm.CodeObject(), NeedsImmovableCode()); 120 desc, flags, masm.CodeObject(), NeedsImmovableCode());
121 RecordCodeGeneration(*new_object, &masm); 121 RecordCodeGeneration(*new_object, &masm);
122 FinishCode(new_object); 122 FinishCode(*new_object);
123 123
124 // Update the dictionary and the root in Heap. 124 // Update the dictionary and the root in Heap.
125 Handle<NumberDictionary> dict = 125 Handle<NumberDictionary> dict =
126 factory->DictionaryAtNumberPut( 126 factory->DictionaryAtNumberPut(
127 Handle<NumberDictionary>(heap->code_stubs()), 127 Handle<NumberDictionary>(heap->code_stubs()),
128 GetKey(), 128 GetKey(),
129 new_object); 129 new_object);
130 heap->public_set_code_stubs(*dict); 130 heap->public_set_code_stubs(*dict);
131 code = *new_object; 131 code = *new_object;
132 Activate(code); 132 Activate(code);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return_true_false_object = "_TRUEFALSE"; 206 return_true_false_object = "_TRUEFALSE";
207 } 207 }
208 208
209 stream->Add("InstanceofStub%s%s%s", 209 stream->Add("InstanceofStub%s%s%s",
210 args, 210 args,
211 inline_check, 211 inline_check,
212 return_true_false_object); 212 return_true_false_object);
213 } 213 }
214 214
215 215
216 void JSEntryStub::FinishCode(Handle<Code> code) {
217 Handle<FixedArray> handler_table =
218 code->GetIsolate()->factory()->NewFixedArray(1, TENURED);
219 handler_table->set(0, Smi::FromInt(handler_offset_));
220 code->set_handler_table(*handler_table);
221 }
222
223
224 void KeyedLoadElementStub::Generate(MacroAssembler* masm) { 216 void KeyedLoadElementStub::Generate(MacroAssembler* masm) {
225 switch (elements_kind_) { 217 switch (elements_kind_) {
226 case FAST_ELEMENTS: 218 case FAST_ELEMENTS:
227 case FAST_SMI_ONLY_ELEMENTS: 219 case FAST_SMI_ONLY_ELEMENTS:
228 KeyedLoadStubCompiler::GenerateLoadFastElement(masm); 220 KeyedLoadStubCompiler::GenerateLoadFastElement(masm);
229 break; 221 break;
230 case FAST_DOUBLE_ELEMENTS: 222 case FAST_DOUBLE_ELEMENTS:
231 KeyedLoadStubCompiler::GenerateLoadFastDoubleElement(masm); 223 KeyedLoadStubCompiler::GenerateLoadFastDoubleElement(masm);
232 break; 224 break;
233 case EXTERNAL_BYTE_ELEMENTS: 225 case EXTERNAL_BYTE_ELEMENTS:
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_); 393 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_);
402 } else { 394 } else {
403 UNREACHABLE(); 395 UNREACHABLE();
404 } 396 }
405 } 397 }
406 masm->bind(&fail); 398 masm->bind(&fail);
407 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); 399 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_);
408 } 400 }
409 401
410 } } // namespace v8::internal 402 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698