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

Side by Side Diff: src/objects.h

Issue 6894003: Better support for 'polymorphic' JS and external arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final review feedback 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_OBJECTS_H_ 28 #ifndef V8_OBJECTS_H_
29 #define V8_OBJECTS_H_ 29 #define V8_OBJECTS_H_
30 30
31 #include "allocation.h" 31 #include "allocation.h"
32 #include "builtins.h" 32 #include "builtins.h"
33 #include "list.h"
33 #include "smart-pointer.h" 34 #include "smart-pointer.h"
34 #include "unicode-inl.h" 35 #include "unicode-inl.h"
35 #if V8_TARGET_ARCH_ARM 36 #if V8_TARGET_ARCH_ARM
36 #include "arm/constants-arm.h" 37 #include "arm/constants-arm.h"
37 #elif V8_TARGET_ARCH_MIPS 38 #elif V8_TARGET_ARCH_MIPS
38 #include "mips/constants-mips.h" 39 #include "mips/constants-mips.h"
39 #endif 40 #endif
40 41
41 // 42 //
42 // Most object types in the V8 JavaScript are described in this file. 43 // Most object types in the V8 JavaScript are described in this file.
(...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after
3268 FLAGS_MAX_VALUE = kMaxInt 3269 FLAGS_MAX_VALUE = kMaxInt
3269 }; 3270 };
3270 3271
3271 enum Kind { 3272 enum Kind {
3272 FUNCTION, 3273 FUNCTION,
3273 OPTIMIZED_FUNCTION, 3274 OPTIMIZED_FUNCTION,
3274 STUB, 3275 STUB,
3275 BUILTIN, 3276 BUILTIN,
3276 LOAD_IC, 3277 LOAD_IC,
3277 KEYED_LOAD_IC, 3278 KEYED_LOAD_IC,
3278 KEYED_EXTERNAL_ARRAY_LOAD_IC,
3279 CALL_IC, 3279 CALL_IC,
3280 KEYED_CALL_IC, 3280 KEYED_CALL_IC,
3281 STORE_IC, 3281 STORE_IC,
3282 KEYED_STORE_IC, 3282 KEYED_STORE_IC,
3283 KEYED_EXTERNAL_ARRAY_STORE_IC,
3284 TYPE_RECORDING_UNARY_OP_IC, 3283 TYPE_RECORDING_UNARY_OP_IC,
3285 TYPE_RECORDING_BINARY_OP_IC, 3284 TYPE_RECORDING_BINARY_OP_IC,
3286 COMPARE_IC, 3285 COMPARE_IC,
3287 // No more than 16 kinds. The value currently encoded in four bits in 3286 // No more than 16 kinds. The value currently encoded in four bits in
3288 // Flags. 3287 // Flags.
3289 3288
3290 // Pseudo-kinds. 3289 // Pseudo-kinds.
3291 REGEXP = BUILTIN, 3290 REGEXP = BUILTIN,
3292 FIRST_IC_KIND = LOAD_IC, 3291 FIRST_IC_KIND = LOAD_IC,
3293 LAST_IC_KIND = COMPARE_IC 3292 LAST_IC_KIND = COMPARE_IC
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 3355 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
3357 inline bool is_call_stub() { return kind() == CALL_IC; } 3356 inline bool is_call_stub() { return kind() == CALL_IC; }
3358 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } 3357 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; }
3359 inline bool is_type_recording_unary_op_stub() { 3358 inline bool is_type_recording_unary_op_stub() {
3360 return kind() == TYPE_RECORDING_UNARY_OP_IC; 3359 return kind() == TYPE_RECORDING_UNARY_OP_IC;
3361 } 3360 }
3362 inline bool is_type_recording_binary_op_stub() { 3361 inline bool is_type_recording_binary_op_stub() {
3363 return kind() == TYPE_RECORDING_BINARY_OP_IC; 3362 return kind() == TYPE_RECORDING_BINARY_OP_IC;
3364 } 3363 }
3365 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 3364 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
3366 inline bool is_external_array_load_stub() {
3367 return kind() == KEYED_EXTERNAL_ARRAY_LOAD_IC;
3368 }
3369 inline bool is_external_array_store_stub() {
3370 return kind() == KEYED_EXTERNAL_ARRAY_STORE_IC;
3371 }
3372 3365
3373 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. 3366 // [major_key]: For kind STUB or BINARY_OP_IC, the major key.
3374 inline int major_key(); 3367 inline int major_key();
3375 inline void set_major_key(int value); 3368 inline void set_major_key(int value);
3376 3369
3377 // [optimizable]: For FUNCTION kind, tells if it is optimizable. 3370 // [optimizable]: For FUNCTION kind, tells if it is optimizable.
3378 inline bool optimizable(); 3371 inline bool optimizable();
3379 inline void set_optimizable(bool value); 3372 inline void set_optimizable(bool value);
3380 3373
3381 // [has_deoptimization_support]: For FUNCTION kind, tells if it has 3374 // [has_deoptimization_support]: For FUNCTION kind, tells if it has
(...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after
6778 } else { 6771 } else {
6779 value &= ~(1 << bit_position); 6772 value &= ~(1 << bit_position);
6780 } 6773 }
6781 return value; 6774 return value;
6782 } 6775 }
6783 }; 6776 };
6784 6777
6785 } } // namespace v8::internal 6778 } } // namespace v8::internal
6786 6779
6787 #endif // V8_OBJECTS_H_ 6780 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698