| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 static Object* Runtime_IsConstructCall(Arguments args) { | 282 static Object* Runtime_IsConstructCall(Arguments args) { |
| 283 NoHandleAllocation ha; | 283 NoHandleAllocation ha; |
| 284 ASSERT(args.length() == 0); | 284 ASSERT(args.length() == 0); |
| 285 JavaScriptFrameIterator it; | 285 JavaScriptFrameIterator it; |
| 286 return Heap::ToBoolean(it.frame()->IsConstructor()); | 286 return Heap::ToBoolean(it.frame()->IsConstructor()); |
| 287 } | 287 } |
| 288 | 288 |
| 289 | 289 |
| 290 static Object* Runtime_RegExpCompile(Arguments args) { | 290 static Object* Runtime_RegExpCompile(Arguments args) { |
| 291 HandleScope scope; // create a new handle scope | 291 HandleScope scope; |
| 292 ASSERT(args.length() == 3); | 292 ASSERT(args.length() == 3); |
| 293 CONVERT_CHECKED(JSRegExp, raw_re, args[0]); | 293 CONVERT_CHECKED(JSRegExp, raw_re, args[0]); |
| 294 Handle<JSRegExp> re(raw_re); | 294 Handle<JSRegExp> re(raw_re); |
| 295 CONVERT_CHECKED(String, raw_pattern, args[1]); | 295 CONVERT_CHECKED(String, raw_pattern, args[1]); |
| 296 Handle<String> pattern(raw_pattern); | 296 Handle<String> pattern(raw_pattern); |
| 297 CONVERT_CHECKED(String, raw_flags, args[2]); | 297 CONVERT_CHECKED(String, raw_flags, args[2]); |
| 298 Handle<String> flags(raw_flags); | 298 Handle<String> flags(raw_flags); |
| 299 Handle<Object> result = RegExpImpl::Compile(re, pattern, flags); | 299 Handle<Object> result = RegExpImpl::Compile(re, pattern, flags); |
| 300 if (result.is_null()) return Failure::Exception(); | 300 if (result.is_null()) return Failure::Exception(); |
| 301 return *result; | 301 return *result; |
| (...skipping 5570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5872 } else { | 5872 } else { |
| 5873 // Handle last resort GC and make sure to allow future allocations | 5873 // Handle last resort GC and make sure to allow future allocations |
| 5874 // to grow the heap without causing GCs (if possible). | 5874 // to grow the heap without causing GCs (if possible). |
| 5875 Counters::gc_last_resort_from_js.Increment(); | 5875 Counters::gc_last_resort_from_js.Increment(); |
| 5876 Heap::CollectAllGarbage(); | 5876 Heap::CollectAllGarbage(); |
| 5877 } | 5877 } |
| 5878 } | 5878 } |
| 5879 | 5879 |
| 5880 | 5880 |
| 5881 } } // namespace v8::internal | 5881 } } // namespace v8::internal |
| OLD | NEW |