OLD | NEW |
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 13224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13235 ASSERT(args.length() == 2); | 13235 ASSERT(args.length() == 2); |
13236 OS::PrintError("abort: %s\n", | 13236 OS::PrintError("abort: %s\n", |
13237 reinterpret_cast<char*>(args[0]) + args.smi_at(1)); | 13237 reinterpret_cast<char*>(args[0]) + args.smi_at(1)); |
13238 isolate->PrintStack(); | 13238 isolate->PrintStack(); |
13239 OS::Abort(); | 13239 OS::Abort(); |
13240 UNREACHABLE(); | 13240 UNREACHABLE(); |
13241 return NULL; | 13241 return NULL; |
13242 } | 13242 } |
13243 | 13243 |
13244 | 13244 |
| 13245 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) { |
| 13246 HandleScope scope(isolate); |
| 13247 ASSERT(args.length() == 1); |
| 13248 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); |
| 13249 FlattenString(str); |
| 13250 return isolate->heap()->undefined_value(); |
| 13251 } |
| 13252 |
| 13253 |
13245 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFromCache) { | 13254 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFromCache) { |
13246 // This is only called from codegen, so checks might be more lax. | 13255 // This is only called from codegen, so checks might be more lax. |
13247 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); | 13256 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); |
13248 Object* key = args[1]; | 13257 Object* key = args[1]; |
13249 | 13258 |
13250 int finger_index = cache->finger_index(); | 13259 int finger_index = cache->finger_index(); |
13251 Object* o = cache->get(finger_index); | 13260 Object* o = cache->get(finger_index); |
13252 if (o == key) { | 13261 if (o == key) { |
13253 // The fastest case: hit the same place again. | 13262 // The fastest case: hit the same place again. |
13254 return cache->get(finger_index + 1); | 13263 return cache->get(finger_index + 1); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13620 // Handle last resort GC and make sure to allow future allocations | 13629 // Handle last resort GC and make sure to allow future allocations |
13621 // to grow the heap without causing GCs (if possible). | 13630 // to grow the heap without causing GCs (if possible). |
13622 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13631 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13623 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13632 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13624 "Runtime::PerformGC"); | 13633 "Runtime::PerformGC"); |
13625 } | 13634 } |
13626 } | 13635 } |
13627 | 13636 |
13628 | 13637 |
13629 } } // namespace v8::internal | 13638 } } // namespace v8::internal |
OLD | NEW |