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

Side by Side Diff: src/objects.h

Issue 6879081: Added type recording for unary minus and unary bitwise negation. Note that the (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 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
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 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after
3230 STUB, 3230 STUB,
3231 BUILTIN, 3231 BUILTIN,
3232 LOAD_IC, 3232 LOAD_IC,
3233 KEYED_LOAD_IC, 3233 KEYED_LOAD_IC,
3234 KEYED_EXTERNAL_ARRAY_LOAD_IC, 3234 KEYED_EXTERNAL_ARRAY_LOAD_IC,
3235 CALL_IC, 3235 CALL_IC,
3236 KEYED_CALL_IC, 3236 KEYED_CALL_IC,
3237 STORE_IC, 3237 STORE_IC,
3238 KEYED_STORE_IC, 3238 KEYED_STORE_IC,
3239 KEYED_EXTERNAL_ARRAY_STORE_IC, 3239 KEYED_EXTERNAL_ARRAY_STORE_IC,
3240 TYPE_RECORDING_UNARY_OP_IC,
3240 TYPE_RECORDING_BINARY_OP_IC, 3241 TYPE_RECORDING_BINARY_OP_IC,
3241 COMPARE_IC, 3242 COMPARE_IC,
3242 // No more than 16 kinds. The value currently encoded in four bits in 3243 // No more than 16 kinds. The value currently encoded in four bits in
3243 // Flags. 3244 // Flags.
3244 3245
3245 // Pseudo-kinds. 3246 // Pseudo-kinds.
3246 REGEXP = BUILTIN, 3247 REGEXP = BUILTIN,
3247 FIRST_IC_KIND = LOAD_IC, 3248 FIRST_IC_KIND = LOAD_IC,
3248 LAST_IC_KIND = COMPARE_IC 3249 LAST_IC_KIND = COMPARE_IC
3249 }; 3250 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 inline int arguments_count(); // Only valid for call IC stubs. 3299 inline int arguments_count(); // Only valid for call IC stubs.
3299 3300
3300 // Testers for IC stub kinds. 3301 // Testers for IC stub kinds.
3301 inline bool is_inline_cache_stub(); 3302 inline bool is_inline_cache_stub();
3302 inline bool is_load_stub() { return kind() == LOAD_IC; } 3303 inline bool is_load_stub() { return kind() == LOAD_IC; }
3303 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 3304 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
3304 inline bool is_store_stub() { return kind() == STORE_IC; } 3305 inline bool is_store_stub() { return kind() == STORE_IC; }
3305 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 3306 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
3306 inline bool is_call_stub() { return kind() == CALL_IC; } 3307 inline bool is_call_stub() { return kind() == CALL_IC; }
3307 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } 3308 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; }
3309 inline bool is_type_recording_unary_op_stub() {
3310 return kind() == TYPE_RECORDING_UNARY_OP_IC;
3311 }
3308 inline bool is_type_recording_binary_op_stub() { 3312 inline bool is_type_recording_binary_op_stub() {
3309 return kind() == TYPE_RECORDING_BINARY_OP_IC; 3313 return kind() == TYPE_RECORDING_BINARY_OP_IC;
3310 } 3314 }
3311 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 3315 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
3312 inline bool is_external_array_load_stub() { 3316 inline bool is_external_array_load_stub() {
3313 return kind() == KEYED_EXTERNAL_ARRAY_LOAD_IC; 3317 return kind() == KEYED_EXTERNAL_ARRAY_LOAD_IC;
3314 } 3318 }
3315 inline bool is_external_array_store_stub() { 3319 inline bool is_external_array_store_stub() {
3316 return kind() == KEYED_EXTERNAL_ARRAY_STORE_IC; 3320 return kind() == KEYED_EXTERNAL_ARRAY_STORE_IC;
3317 } 3321 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 // receiver is valid for the given call. 3359 // receiver is valid for the given call.
3356 inline CheckType check_type(); 3360 inline CheckType check_type();
3357 inline void set_check_type(CheckType value); 3361 inline void set_check_type(CheckType value);
3358 3362
3359 // [external array type]: For kind KEYED_EXTERNAL_ARRAY_LOAD_IC and 3363 // [external array type]: For kind KEYED_EXTERNAL_ARRAY_LOAD_IC and
3360 // KEYED_EXTERNAL_ARRAY_STORE_IC, identifies the type of external 3364 // KEYED_EXTERNAL_ARRAY_STORE_IC, identifies the type of external
3361 // array that the code stub is specialized for. 3365 // array that the code stub is specialized for.
3362 inline ExternalArrayType external_array_type(); 3366 inline ExternalArrayType external_array_type();
3363 inline void set_external_array_type(ExternalArrayType value); 3367 inline void set_external_array_type(ExternalArrayType value);
3364 3368
3369 // [type-recording unary op type]: For all TYPE_RECORDING_UNARY_OP_IC.
3370 inline byte type_recording_unary_op_type();
3371 inline void set_type_recording_unary_op_type(byte value);
3372
3365 // [type-recording binary op type]: For all TYPE_RECORDING_BINARY_OP_IC. 3373 // [type-recording binary op type]: For all TYPE_RECORDING_BINARY_OP_IC.
3366 inline byte type_recording_binary_op_type(); 3374 inline byte type_recording_binary_op_type();
3367 inline void set_type_recording_binary_op_type(byte value); 3375 inline void set_type_recording_binary_op_type(byte value);
3368 inline byte type_recording_binary_op_result_type(); 3376 inline byte type_recording_binary_op_result_type();
3369 inline void set_type_recording_binary_op_result_type(byte value); 3377 inline void set_type_recording_binary_op_result_type(byte value);
3370 3378
3371 // [compare state]: For kind compare IC stubs, tells what state the 3379 // [compare state]: For kind compare IC stubs, tells what state the
3372 // stub is in. 3380 // stub is in.
3373 inline byte compare_state(); 3381 inline byte compare_state();
3374 inline void set_compare_state(byte value); 3382 inline void set_compare_state(byte value);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3506 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; 3514 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
3507 3515
3508 // Byte offsets within kKindSpecificFlagsOffset. 3516 // Byte offsets within kKindSpecificFlagsOffset.
3509 static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset; 3517 static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset;
3510 static const int kOptimizableOffset = kKindSpecificFlagsOffset; 3518 static const int kOptimizableOffset = kKindSpecificFlagsOffset;
3511 static const int kStackSlotsOffset = kKindSpecificFlagsOffset; 3519 static const int kStackSlotsOffset = kKindSpecificFlagsOffset;
3512 static const int kCheckTypeOffset = kKindSpecificFlagsOffset; 3520 static const int kCheckTypeOffset = kKindSpecificFlagsOffset;
3513 static const int kExternalArrayTypeOffset = kKindSpecificFlagsOffset; 3521 static const int kExternalArrayTypeOffset = kKindSpecificFlagsOffset;
3514 3522
3515 static const int kCompareStateOffset = kStubMajorKeyOffset + 1; 3523 static const int kCompareStateOffset = kStubMajorKeyOffset + 1;
3524 static const int kUnaryOpTypeOffset = kStubMajorKeyOffset + 1;
3516 static const int kBinaryOpTypeOffset = kStubMajorKeyOffset + 1; 3525 static const int kBinaryOpTypeOffset = kStubMajorKeyOffset + 1;
3517 static const int kHasDeoptimizationSupportOffset = kOptimizableOffset + 1; 3526 static const int kHasDeoptimizationSupportOffset = kOptimizableOffset + 1;
3518 3527
3519 static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1; 3528 static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1;
3520 static const int kAllowOSRAtLoopNestingLevelOffset = 3529 static const int kAllowOSRAtLoopNestingLevelOffset =
3521 kHasDeoptimizationSupportOffset + 1; 3530 kHasDeoptimizationSupportOffset + 1;
3522 3531
3523 static const int kSafepointTableOffsetOffset = kStackSlotsOffset + kIntSize; 3532 static const int kSafepointTableOffsetOffset = kStackSlotsOffset + kIntSize;
3524 static const int kStackCheckTableOffsetOffset = kStackSlotsOffset + kIntSize; 3533 static const int kStackCheckTableOffsetOffset = kStackSlotsOffset + kIntSize;
3525 3534
(...skipping 3122 matching lines...) Expand 10 before | Expand all | Expand 10 after
6648 } else { 6657 } else {
6649 value &= ~(1 << bit_position); 6658 value &= ~(1 << bit_position);
6650 } 6659 }
6651 return value; 6660 return value;
6652 } 6661 }
6653 }; 6662 };
6654 6663
6655 } } // namespace v8::internal 6664 } } // namespace v8::internal
6656 6665
6657 #endif // V8_OBJECTS_H_ 6666 #endif // V8_OBJECTS_H_
OLDNEW
« src/arm/code-stubs-arm.cc ('K') | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698