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

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

Issue 9227007: Version 3.8.6 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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/builtins.cc ('k') | src/compiler.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 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 22 matching lines...) Expand all
33 #include "factory.h" 33 #include "factory.h"
34 #include "gdb-jit.h" 34 #include "gdb-jit.h"
35 #include "macro-assembler.h" 35 #include "macro-assembler.h"
36 36
37 namespace v8 { 37 namespace v8 {
38 namespace internal { 38 namespace internal {
39 39
40 bool CodeStub::FindCodeInCache(Code** code_out) { 40 bool CodeStub::FindCodeInCache(Code** code_out) {
41 Heap* heap = Isolate::Current()->heap(); 41 Heap* heap = Isolate::Current()->heap();
42 int index = heap->code_stubs()->FindEntry(GetKey()); 42 int index = heap->code_stubs()->FindEntry(GetKey());
43 if (index != NumberDictionary::kNotFound) { 43 if (index != UnseededNumberDictionary::kNotFound) {
44 *code_out = Code::cast(heap->code_stubs()->ValueAt(index)); 44 *code_out = Code::cast(heap->code_stubs()->ValueAt(index));
45 return true; 45 return true;
46 } 46 }
47 return false; 47 return false;
48 } 48 }
49 49
50 50
51 void CodeStub::GenerateCode(MacroAssembler* masm) { 51 void CodeStub::GenerateCode(MacroAssembler* masm) {
52 // Update the static counter each time a new code stub is generated. 52 // Update the static counter each time a new code stub is generated.
53 masm->isolate()->counters()->code_stubs()->Increment(); 53 masm->isolate()->counters()->code_stubs()->Increment();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 GetICState()); 125 GetICState());
126 Handle<Code> new_object = factory->NewCode( 126 Handle<Code> new_object = factory->NewCode(
127 desc, flags, masm.CodeObject(), NeedsImmovableCode()); 127 desc, flags, masm.CodeObject(), NeedsImmovableCode());
128 RecordCodeGeneration(*new_object, &masm); 128 RecordCodeGeneration(*new_object, &masm);
129 FinishCode(new_object); 129 FinishCode(new_object);
130 130
131 if (UseSpecialCache()) { 131 if (UseSpecialCache()) {
132 AddToSpecialCache(new_object); 132 AddToSpecialCache(new_object);
133 } else { 133 } else {
134 // Update the dictionary and the root in Heap. 134 // Update the dictionary and the root in Heap.
135 Handle<NumberDictionary> dict = 135 Handle<UnseededNumberDictionary> dict =
136 factory->DictionaryAtNumberPut( 136 factory->DictionaryAtNumberPut(
137 Handle<NumberDictionary>(heap->code_stubs()), 137 Handle<UnseededNumberDictionary>(heap->code_stubs()),
138 GetKey(), 138 GetKey(),
139 new_object); 139 new_object);
140 heap->public_set_code_stubs(*dict); 140 heap->public_set_code_stubs(*dict);
141 } 141 }
142 code = *new_object; 142 code = *new_object;
143 } 143 }
144 144
145 Activate(code); 145 Activate(code);
146 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code)); 146 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code));
147 return Handle<Code>(code, isolate); 147 return Handle<Code>(code, isolate);
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_); 440 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_);
441 } else { 441 } else {
442 UNREACHABLE(); 442 UNREACHABLE();
443 } 443 }
444 } 444 }
445 masm->bind(&fail); 445 masm->bind(&fail);
446 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); 446 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_);
447 } 447 }
448 448
449 } } // namespace v8::internal 449 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698