OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 RUNTIME_FUNCTION(Runtime_RenderCallSite) { | 159 RUNTIME_FUNCTION(Runtime_RenderCallSite) { |
160 HandleScope scope(isolate); | 160 HandleScope scope(isolate); |
161 DCHECK(args.length() == 0); | 161 DCHECK(args.length() == 0); |
162 MessageLocation location; | 162 MessageLocation location; |
163 isolate->ComputeLocation(&location); | 163 isolate->ComputeLocation(&location); |
164 if (location.start_pos() == -1) return isolate->heap()->empty_string(); | 164 if (location.start_pos() == -1) return isolate->heap()->empty_string(); |
165 | 165 |
166 Zone zone; | 166 Zone zone; |
167 if (location.function()->shared()->is_function()) { | 167 if (location.function()->shared()->is_function()) { |
168 CompilationInfo info(location.function(), &zone); | 168 CompilationInfo info(location.function(), &zone); |
169 if (!Parser::Parse(&info)) { | 169 if (!Parser::ParseStatic(&info)) { |
170 isolate->clear_pending_exception(); | 170 isolate->clear_pending_exception(); |
171 return isolate->heap()->empty_string(); | 171 return isolate->heap()->empty_string(); |
172 } | 172 } |
173 CallPrinter printer(isolate, &zone); | 173 CallPrinter printer(isolate, &zone); |
174 const char* string = printer.Print(info.function(), location.start_pos()); | 174 const char* string = printer.Print(info.function(), location.start_pos()); |
175 return *isolate->factory()->NewStringFromAsciiChecked(string); | 175 return *isolate->factory()->NewStringFromAsciiChecked(string); |
176 } | 176 } |
177 | 177 |
178 CompilationInfo info(location.script(), &zone); | 178 CompilationInfo info(location.script(), &zone); |
179 if (!Parser::Parse(&info)) { | 179 if (!Parser::ParseStatic(&info)) { |
180 isolate->clear_pending_exception(); | 180 isolate->clear_pending_exception(); |
181 return isolate->heap()->empty_string(); | 181 return isolate->heap()->empty_string(); |
182 } | 182 } |
183 CallPrinter printer(isolate, &zone); | 183 CallPrinter printer(isolate, &zone); |
184 const char* string = printer.Print(info.function(), location.start_pos()); | 184 const char* string = printer.Print(info.function(), location.start_pos()); |
185 return *isolate->factory()->NewStringFromAsciiChecked(string); | 185 return *isolate->factory()->NewStringFromAsciiChecked(string); |
186 } | 186 } |
187 | 187 |
188 | 188 |
189 RUNTIME_FUNCTION(Runtime_GetFromCache) { | 189 RUNTIME_FUNCTION(Runtime_GetFromCache) { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 306 |
307 RUNTIME_FUNCTION(RuntimeReference_GetFromCache) { | 307 RUNTIME_FUNCTION(RuntimeReference_GetFromCache) { |
308 HandleScope scope(isolate); | 308 HandleScope scope(isolate); |
309 DCHECK(args.length() == 2); | 309 DCHECK(args.length() == 2); |
310 CONVERT_SMI_ARG_CHECKED(id, 0); | 310 CONVERT_SMI_ARG_CHECKED(id, 0); |
311 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); | 311 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); |
312 return __RT_impl_Runtime_GetFromCache(args, isolate); | 312 return __RT_impl_Runtime_GetFromCache(args, isolate); |
313 } | 313 } |
314 } | 314 } |
315 } // namespace v8::internal | 315 } // namespace v8::internal |
OLD | NEW |