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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 if (!Parser::ParseStatic(&info)) { | 194 if (!Parser::ParseStatic(&info)) { |
195 isolate->clear_pending_exception(); | 195 isolate->clear_pending_exception(); |
196 return isolate->heap()->empty_string(); | 196 return isolate->heap()->empty_string(); |
197 } | 197 } |
198 CallPrinter printer(isolate, &zone); | 198 CallPrinter printer(isolate, &zone); |
199 const char* string = printer.Print(info.function(), location.start_pos()); | 199 const char* string = printer.Print(info.function(), location.start_pos()); |
200 return *isolate->factory()->NewStringFromAsciiChecked(string); | 200 return *isolate->factory()->NewStringFromAsciiChecked(string); |
201 } | 201 } |
202 | 202 |
203 | 203 |
204 RUNTIME_FUNCTION(Runtime_GetFromCache) { | 204 RUNTIME_FUNCTION(Runtime_GetFromCacheRT) { |
205 SealHandleScope shs(isolate); | 205 SealHandleScope shs(isolate); |
206 // This is only called from codegen, so checks might be more lax. | 206 // This is only called from codegen, so checks might be more lax. |
207 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); | 207 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); |
208 CONVERT_ARG_CHECKED(Object, key, 1); | 208 CONVERT_ARG_CHECKED(Object, key, 1); |
209 | 209 |
210 { | 210 { |
211 DisallowHeapAllocation no_alloc; | 211 DisallowHeapAllocation no_alloc; |
212 | 212 |
213 int finger_index = cache->finger_index(); | 213 int finger_index = cache->finger_index(); |
214 Object* o = cache->get(finger_index); | 214 Object* o = cache->get(finger_index); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 return message->script(); | 312 return message->script(); |
313 } | 313 } |
314 | 314 |
315 | 315 |
316 RUNTIME_FUNCTION(Runtime_IS_VAR) { | 316 RUNTIME_FUNCTION(Runtime_IS_VAR) { |
317 UNREACHABLE(); // implemented as macro in the parser | 317 UNREACHABLE(); // implemented as macro in the parser |
318 return NULL; | 318 return NULL; |
319 } | 319 } |
320 | 320 |
321 | 321 |
322 RUNTIME_FUNCTION(RuntimeReference_GetFromCache) { | 322 RUNTIME_FUNCTION(Runtime_GetFromCache) { |
323 HandleScope scope(isolate); | 323 HandleScope scope(isolate); |
324 DCHECK(args.length() == 2); | 324 DCHECK(args.length() == 2); |
325 CONVERT_SMI_ARG_CHECKED(id, 0); | 325 CONVERT_SMI_ARG_CHECKED(id, 0); |
326 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); | 326 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); |
327 return __RT_impl_Runtime_GetFromCache(args, isolate); | 327 return __RT_impl_Runtime_GetFromCacheRT(args, isolate); |
328 } | 328 } |
329 } | 329 } |
330 } // namespace v8::internal | 330 } // namespace v8::internal |
OLD | NEW |