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

Side by Side Diff: src/objects.h

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/ia32/lithium-codegen-ia32.cc ('k') | src/runtime.cc » ('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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 JS_MESSAGE_OBJECT_TYPE, 555 JS_MESSAGE_OBJECT_TYPE,
556 556
557 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE 557 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE
558 JS_OBJECT_TYPE, 558 JS_OBJECT_TYPE,
559 JS_CONTEXT_EXTENSION_OBJECT_TYPE, 559 JS_CONTEXT_EXTENSION_OBJECT_TYPE,
560 JS_GLOBAL_OBJECT_TYPE, 560 JS_GLOBAL_OBJECT_TYPE,
561 JS_BUILTINS_OBJECT_TYPE, 561 JS_BUILTINS_OBJECT_TYPE,
562 JS_GLOBAL_PROXY_TYPE, 562 JS_GLOBAL_PROXY_TYPE,
563 JS_ARRAY_TYPE, 563 JS_ARRAY_TYPE,
564 564
565 JS_REGEXP_TYPE, // LAST_JS_OBJECT_TYPE, FIRST_FUNCTION_CLASS_TYPE 565 JS_REGEXP_TYPE, // LAST_JS_OBJECT_TYPE
566 566
567 JS_FUNCTION_TYPE, 567 JS_FUNCTION_TYPE, // FIRST_FUNCTION_CLASS_TYPE
568 568
569 // Pseudo-types 569 // Pseudo-types
570 FIRST_TYPE = 0x0, 570 FIRST_TYPE = 0x0,
571 LAST_TYPE = JS_FUNCTION_TYPE, 571 LAST_TYPE = JS_FUNCTION_TYPE,
572 INVALID_TYPE = FIRST_TYPE - 1, 572 INVALID_TYPE = FIRST_TYPE - 1,
573 FIRST_NONSTRING_TYPE = MAP_TYPE, 573 FIRST_NONSTRING_TYPE = MAP_TYPE,
574 // Boundaries for testing for an external array. 574 // Boundaries for testing for an external array.
575 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE, 575 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE,
576 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE, 576 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE,
577 // Boundary for promotion to old data space/old pointer space. 577 // Boundary for promotion to old data space/old pointer space.
578 LAST_DATA_TYPE = FILLER_TYPE, 578 LAST_DATA_TYPE = FILLER_TYPE,
579 // Boundaries for testing the type is a JavaScript "object". Note that 579 // Boundaries for testing the type is a JavaScript "object". Note that
580 // function objects are not counted as objects, even though they are 580 // function objects are not counted as objects, even though they are
581 // implemented as such; only values whose typeof is "object" are included. 581 // implemented as such; only values whose typeof is "object" are included.
582 FIRST_JS_OBJECT_TYPE = JS_VALUE_TYPE, 582 FIRST_JS_OBJECT_TYPE = JS_VALUE_TYPE,
583 LAST_JS_OBJECT_TYPE = JS_REGEXP_TYPE, 583 LAST_JS_OBJECT_TYPE = JS_REGEXP_TYPE,
584 // RegExp objects have [[Class]] "function" because they are callable. 584 // RegExp objects have [[Class]] "function" because they are callable.
585 // All types from this type and above are objects with [[Class]] "function". 585 // All types from this type and above are objects with [[Class]] "function".
586 FIRST_FUNCTION_CLASS_TYPE = JS_REGEXP_TYPE 586 FIRST_FUNCTION_CLASS_TYPE = JS_FUNCTION_TYPE
587 }; 587 };
588 588
589 static const int kExternalArrayTypeCount = LAST_EXTERNAL_ARRAY_TYPE - 589 static const int kExternalArrayTypeCount = LAST_EXTERNAL_ARRAY_TYPE -
590 FIRST_EXTERNAL_ARRAY_TYPE + 1; 590 FIRST_EXTERNAL_ARRAY_TYPE + 1;
591 591
592 STATIC_CHECK(JS_OBJECT_TYPE == Internals::kJSObjectType); 592 STATIC_CHECK(JS_OBJECT_TYPE == Internals::kJSObjectType);
593 STATIC_CHECK(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); 593 STATIC_CHECK(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType);
594 STATIC_CHECK(FOREIGN_TYPE == Internals::kForeignType); 594 STATIC_CHECK(FOREIGN_TYPE == Internals::kForeignType);
595 595
596 596
(...skipping 6236 matching lines...) Expand 10 before | Expand all | Expand 10 after
6833 } else { 6833 } else {
6834 value &= ~(1 << bit_position); 6834 value &= ~(1 << bit_position);
6835 } 6835 }
6836 return value; 6836 return value;
6837 } 6837 }
6838 }; 6838 };
6839 6839
6840 } } // namespace v8::internal 6840 } } // namespace v8::internal
6841 6841
6842 #endif // V8_OBJECTS_H_ 6842 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698