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

Side by Side Diff: src/runtime.cc

Issue 6930006: Make RegExp objects not callable. (Closed)
Patch Set: Address review comments Created 9 years, 7 months 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
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/json.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4630 switch (instance_type) { 4630 switch (instance_type) {
4631 case ODDBALL_TYPE: 4631 case ODDBALL_TYPE:
4632 if (heap_obj->IsTrue() || heap_obj->IsFalse()) { 4632 if (heap_obj->IsTrue() || heap_obj->IsFalse()) {
4633 return isolate->heap()->boolean_symbol(); 4633 return isolate->heap()->boolean_symbol();
4634 } 4634 }
4635 if (heap_obj->IsNull()) { 4635 if (heap_obj->IsNull()) {
4636 return isolate->heap()->object_symbol(); 4636 return isolate->heap()->object_symbol();
4637 } 4637 }
4638 ASSERT(heap_obj->IsUndefined()); 4638 ASSERT(heap_obj->IsUndefined());
4639 return isolate->heap()->undefined_symbol(); 4639 return isolate->heap()->undefined_symbol();
4640 case JS_FUNCTION_TYPE: case JS_REGEXP_TYPE: 4640 case JS_FUNCTION_TYPE:
4641 return isolate->heap()->function_symbol(); 4641 return isolate->heap()->function_symbol();
4642 default: 4642 default:
4643 // For any kind of object not handled above, the spec rule for 4643 // For any kind of object not handled above, the spec rule for
4644 // host objects gives that it is okay to return "object" 4644 // host objects gives that it is okay to return "object"
4645 return isolate->heap()->object_symbol(); 4645 return isolate->heap()->object_symbol();
4646 } 4646 }
4647 } 4647 }
4648 4648
4649 4649
4650 static bool AreDigits(const char*s, int from, int to) { 4650 static bool AreDigits(const char*s, int from, int to) {
(...skipping 7567 matching lines...) Expand 10 before | Expand all | Expand 10 after
12218 } else { 12218 } else {
12219 // Handle last resort GC and make sure to allow future allocations 12219 // Handle last resort GC and make sure to allow future allocations
12220 // to grow the heap without causing GCs (if possible). 12220 // to grow the heap without causing GCs (if possible).
12221 isolate->counters()->gc_last_resort_from_js()->Increment(); 12221 isolate->counters()->gc_last_resort_from_js()->Increment();
12222 isolate->heap()->CollectAllGarbage(false); 12222 isolate->heap()->CollectAllGarbage(false);
12223 } 12223 }
12224 } 12224 }
12225 12225
12226 12226
12227 } } // namespace v8::internal 12227 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698