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

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: Hopefully final version of this patch... 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
« src/ic.cc ('K') | « src/log.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 3251 matching lines...) Expand 10 before | Expand all | Expand 10 after
3262 STUB, 3262 STUB,
3263 BUILTIN, 3263 BUILTIN,
3264 LOAD_IC, 3264 LOAD_IC,
3265 KEYED_LOAD_IC, 3265 KEYED_LOAD_IC,
3266 KEYED_EXTERNAL_ARRAY_LOAD_IC, 3266 KEYED_EXTERNAL_ARRAY_LOAD_IC,
3267 CALL_IC, 3267 CALL_IC,
3268 KEYED_CALL_IC, 3268 KEYED_CALL_IC,
3269 STORE_IC, 3269 STORE_IC,
3270 KEYED_STORE_IC, 3270 KEYED_STORE_IC,
3271 KEYED_EXTERNAL_ARRAY_STORE_IC, 3271 KEYED_EXTERNAL_ARRAY_STORE_IC,
3272 TYPE_RECORDING_UNARY_OP_IC,
3272 TYPE_RECORDING_BINARY_OP_IC, 3273 TYPE_RECORDING_BINARY_OP_IC,
3273 COMPARE_IC, 3274 COMPARE_IC,
3274 // No more than 16 kinds. The value currently encoded in four bits in 3275 // No more than 16 kinds. The value currently encoded in four bits in
3275 // Flags. 3276 // Flags.
3276 3277
3277 // Pseudo-kinds. 3278 // Pseudo-kinds.
3278 REGEXP = BUILTIN, 3279 REGEXP = BUILTIN,
3279 FIRST_IC_KIND = LOAD_IC, 3280 FIRST_IC_KIND = LOAD_IC,
3280 LAST_IC_KIND = COMPARE_IC 3281 LAST_IC_KIND = COMPARE_IC
3281 }; 3282 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3330 inline int arguments_count(); // Only valid for call IC stubs. 3331 inline int arguments_count(); // Only valid for call IC stubs.
3331 3332
3332 // Testers for IC stub kinds. 3333 // Testers for IC stub kinds.
3333 inline bool is_inline_cache_stub(); 3334 inline bool is_inline_cache_stub();
3334 inline bool is_load_stub() { return kind() == LOAD_IC; } 3335 inline bool is_load_stub() { return kind() == LOAD_IC; }
3335 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 3336 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
3336 inline bool is_store_stub() { return kind() == STORE_IC; } 3337 inline bool is_store_stub() { return kind() == STORE_IC; }
3337 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 3338 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
3338 inline bool is_call_stub() { return kind() == CALL_IC; } 3339 inline bool is_call_stub() { return kind() == CALL_IC; }
3339 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } 3340 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; }
3341 inline bool is_type_recording_unary_op_stub() {
3342 return kind() == TYPE_RECORDING_UNARY_OP_IC;
3343 }
3340 inline bool is_type_recording_binary_op_stub() { 3344 inline bool is_type_recording_binary_op_stub() {
3341 return kind() == TYPE_RECORDING_BINARY_OP_IC; 3345 return kind() == TYPE_RECORDING_BINARY_OP_IC;
3342 } 3346 }
3343 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 3347 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
3344 inline bool is_external_array_load_stub() { 3348 inline bool is_external_array_load_stub() {
3345 return kind() == KEYED_EXTERNAL_ARRAY_LOAD_IC; 3349 return kind() == KEYED_EXTERNAL_ARRAY_LOAD_IC;
3346 } 3350 }
3347 inline bool is_external_array_store_stub() { 3351 inline bool is_external_array_store_stub() {
3348 return kind() == KEYED_EXTERNAL_ARRAY_STORE_IC; 3352 return kind() == KEYED_EXTERNAL_ARRAY_STORE_IC;
3349 } 3353 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3387 // receiver is valid for the given call. 3391 // receiver is valid for the given call.
3388 inline CheckType check_type(); 3392 inline CheckType check_type();
3389 inline void set_check_type(CheckType value); 3393 inline void set_check_type(CheckType value);
3390 3394
3391 // [external array type]: For kind KEYED_EXTERNAL_ARRAY_LOAD_IC and 3395 // [external array type]: For kind KEYED_EXTERNAL_ARRAY_LOAD_IC and
3392 // KEYED_EXTERNAL_ARRAY_STORE_IC, identifies the type of external 3396 // KEYED_EXTERNAL_ARRAY_STORE_IC, identifies the type of external
3393 // array that the code stub is specialized for. 3397 // array that the code stub is specialized for.
3394 inline ExternalArrayType external_array_type(); 3398 inline ExternalArrayType external_array_type();
3395 inline void set_external_array_type(ExternalArrayType value); 3399 inline void set_external_array_type(ExternalArrayType value);
3396 3400
3401 // [type-recording unary op type]: For all TYPE_RECORDING_UNARY_OP_IC.
3402 inline byte type_recording_unary_op_type();
3403 inline void set_type_recording_unary_op_type(byte value);
3404
3397 // [type-recording binary op type]: For all TYPE_RECORDING_BINARY_OP_IC. 3405 // [type-recording binary op type]: For all TYPE_RECORDING_BINARY_OP_IC.
3398 inline byte type_recording_binary_op_type(); 3406 inline byte type_recording_binary_op_type();
3399 inline void set_type_recording_binary_op_type(byte value); 3407 inline void set_type_recording_binary_op_type(byte value);
3400 inline byte type_recording_binary_op_result_type(); 3408 inline byte type_recording_binary_op_result_type();
3401 inline void set_type_recording_binary_op_result_type(byte value); 3409 inline void set_type_recording_binary_op_result_type(byte value);
3402 3410
3403 // [compare state]: For kind compare IC stubs, tells what state the 3411 // [compare state]: For kind compare IC stubs, tells what state the
3404 // stub is in. 3412 // stub is in.
3405 inline byte compare_state(); 3413 inline byte compare_state();
3406 inline void set_compare_state(byte value); 3414 inline void set_compare_state(byte value);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; 3546 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
3539 3547
3540 // Byte offsets within kKindSpecificFlagsOffset. 3548 // Byte offsets within kKindSpecificFlagsOffset.
3541 static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset; 3549 static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset;
3542 static const int kOptimizableOffset = kKindSpecificFlagsOffset; 3550 static const int kOptimizableOffset = kKindSpecificFlagsOffset;
3543 static const int kStackSlotsOffset = kKindSpecificFlagsOffset; 3551 static const int kStackSlotsOffset = kKindSpecificFlagsOffset;
3544 static const int kCheckTypeOffset = kKindSpecificFlagsOffset; 3552 static const int kCheckTypeOffset = kKindSpecificFlagsOffset;
3545 static const int kExternalArrayTypeOffset = kKindSpecificFlagsOffset; 3553 static const int kExternalArrayTypeOffset = kKindSpecificFlagsOffset;
3546 3554
3547 static const int kCompareStateOffset = kStubMajorKeyOffset + 1; 3555 static const int kCompareStateOffset = kStubMajorKeyOffset + 1;
3556 static const int kUnaryOpTypeOffset = kStubMajorKeyOffset + 1;
3548 static const int kBinaryOpTypeOffset = kStubMajorKeyOffset + 1; 3557 static const int kBinaryOpTypeOffset = kStubMajorKeyOffset + 1;
3549 static const int kHasDeoptimizationSupportOffset = kOptimizableOffset + 1; 3558 static const int kHasDeoptimizationSupportOffset = kOptimizableOffset + 1;
3550 3559
3551 static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1; 3560 static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1;
3552 static const int kAllowOSRAtLoopNestingLevelOffset = 3561 static const int kAllowOSRAtLoopNestingLevelOffset =
3553 kHasDeoptimizationSupportOffset + 1; 3562 kHasDeoptimizationSupportOffset + 1;
3554 3563
3555 static const int kSafepointTableOffsetOffset = kStackSlotsOffset + kIntSize; 3564 static const int kSafepointTableOffsetOffset = kStackSlotsOffset + kIntSize;
3556 static const int kStackCheckTableOffsetOffset = kStackSlotsOffset + kIntSize; 3565 static const int kStackCheckTableOffsetOffset = kStackSlotsOffset + kIntSize;
3557 3566
(...skipping 3122 matching lines...) Expand 10 before | Expand all | Expand 10 after
6680 } else { 6689 } else {
6681 value &= ~(1 << bit_position); 6690 value &= ~(1 << bit_position);
6682 } 6691 }
6683 return value; 6692 return value;
6684 } 6693 }
6685 }; 6694 };
6686 6695
6687 } } // namespace v8::internal 6696 } } // namespace v8::internal
6688 6697
6689 #endif // V8_OBJECTS_H_ 6698 #endif // V8_OBJECTS_H_
OLDNEW
« src/ic.cc ('K') | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698