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

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

Issue 96853003: Drop IsPregenerated() and allow_stub_calls flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also ditch the fixed register hack that was required for RecordWriteStub. Created 7 years 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/code-stubs-hydrogen.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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 Handle<Code> PlatformCodeStub::GenerateCode(Isolate* isolate) { 103 Handle<Code> PlatformCodeStub::GenerateCode(Isolate* isolate) {
104 Factory* factory = isolate->factory(); 104 Factory* factory = isolate->factory();
105 105
106 // Generate the new code. 106 // Generate the new code.
107 MacroAssembler masm(isolate, NULL, 256); 107 MacroAssembler masm(isolate, NULL, 256);
108 108
109 { 109 {
110 // Update the static counter each time a new code stub is generated. 110 // Update the static counter each time a new code stub is generated.
111 isolate->counters()->code_stubs()->Increment(); 111 isolate->counters()->code_stubs()->Increment();
112 112
113 // Nested stubs are not allowed for leaves.
114 AllowStubCallsScope allow_scope(&masm, false);
115
116 // Generate the code for the stub. 113 // Generate the code for the stub.
117 masm.set_generating_stub(true); 114 masm.set_generating_stub(true);
118 NoCurrentFrameScope scope(&masm); 115 NoCurrentFrameScope scope(&masm);
119 Generate(&masm); 116 Generate(&masm);
120 } 117 }
121 118
122 // Create the code object. 119 // Create the code object.
123 CodeDesc desc; 120 CodeDesc desc;
124 masm.GetCode(&desc); 121 masm.GetCode(&desc);
125 122
(...skipping 15 matching lines...) Expand all
141 } 138 }
142 139
143 140
144 Handle<Code> CodeStub::GetCode(Isolate* isolate) { 141 Handle<Code> CodeStub::GetCode(Isolate* isolate) {
145 Factory* factory = isolate->factory(); 142 Factory* factory = isolate->factory();
146 Heap* heap = isolate->heap(); 143 Heap* heap = isolate->heap();
147 Code* code; 144 Code* code;
148 if (UseSpecialCache() 145 if (UseSpecialCache()
149 ? FindCodeInSpecialCache(&code, isolate) 146 ? FindCodeInSpecialCache(&code, isolate)
150 : FindCodeInCache(&code, isolate)) { 147 : FindCodeInCache(&code, isolate)) {
151 ASSERT(IsPregenerated(isolate) == code->is_pregenerated());
152 ASSERT(GetCodeKind() == code->kind()); 148 ASSERT(GetCodeKind() == code->kind());
153 return Handle<Code>(code); 149 return Handle<Code>(code);
154 } 150 }
155 151
156 #ifdef DEBUG 152 #ifdef DEBUG
157 VerifyPlatformFeatures(isolate); 153 VerifyPlatformFeatures(isolate);
158 #endif 154 #endif
159 155
160 { 156 {
161 HandleScope scope(isolate); 157 HandleScope scope(isolate);
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 InstallDescriptor(isolate, &stub3); 1202 InstallDescriptor(isolate, &stub3);
1207 } 1203 }
1208 1204
1209 InternalArrayConstructorStub::InternalArrayConstructorStub( 1205 InternalArrayConstructorStub::InternalArrayConstructorStub(
1210 Isolate* isolate) { 1206 Isolate* isolate) {
1211 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1207 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1212 } 1208 }
1213 1209
1214 1210
1215 } } // namespace v8::internal 1211 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698