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

Side by Side Diff: src/objects-inl.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/objects.cc ('k') | src/spaces.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 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 int Code::major_key() { 2596 int Code::major_key() {
2597 ASSERT(kind() == STUB || 2597 ASSERT(kind() == STUB ||
2598 kind() == TYPE_RECORDING_BINARY_OP_IC || 2598 kind() == TYPE_RECORDING_BINARY_OP_IC ||
2599 kind() == COMPARE_IC); 2599 kind() == COMPARE_IC);
2600 return READ_BYTE_FIELD(this, kStubMajorKeyOffset); 2600 return READ_BYTE_FIELD(this, kStubMajorKeyOffset);
2601 } 2601 }
2602 2602
2603 2603
2604 void Code::set_major_key(int major) { 2604 void Code::set_major_key(int major) {
2605 ASSERT(kind() == STUB || 2605 ASSERT(kind() == STUB ||
2606 kind() == TYPE_RECORDING_UNARY_OP_IC ||
2606 kind() == TYPE_RECORDING_BINARY_OP_IC || 2607 kind() == TYPE_RECORDING_BINARY_OP_IC ||
2607 kind() == COMPARE_IC); 2608 kind() == COMPARE_IC);
2608 ASSERT(0 <= major && major < 256); 2609 ASSERT(0 <= major && major < 256);
2609 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major); 2610 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major);
2610 } 2611 }
2611 2612
2612 2613
2613 bool Code::optimizable() { 2614 bool Code::optimizable() {
2614 ASSERT(kind() == FUNCTION); 2615 ASSERT(kind() == FUNCTION);
2615 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; 2616 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 return static_cast<ExternalArrayType>(type); 2705 return static_cast<ExternalArrayType>(type);
2705 } 2706 }
2706 2707
2707 2708
2708 void Code::set_external_array_type(ExternalArrayType value) { 2709 void Code::set_external_array_type(ExternalArrayType value) {
2709 ASSERT(is_external_array_load_stub() || is_external_array_store_stub()); 2710 ASSERT(is_external_array_load_stub() || is_external_array_store_stub());
2710 WRITE_BYTE_FIELD(this, kExternalArrayTypeOffset, value); 2711 WRITE_BYTE_FIELD(this, kExternalArrayTypeOffset, value);
2711 } 2712 }
2712 2713
2713 2714
2715 byte Code::type_recording_unary_op_type() {
2716 ASSERT(is_type_recording_unary_op_stub());
2717 return READ_BYTE_FIELD(this, kUnaryOpTypeOffset);
2718 }
2719
2720
2721 void Code::set_type_recording_unary_op_type(byte value) {
2722 ASSERT(is_type_recording_unary_op_stub());
2723 WRITE_BYTE_FIELD(this, kUnaryOpTypeOffset, value);
2724 }
2725
2726
2714 byte Code::type_recording_binary_op_type() { 2727 byte Code::type_recording_binary_op_type() {
2715 ASSERT(is_type_recording_binary_op_stub()); 2728 ASSERT(is_type_recording_binary_op_stub());
2716 return READ_BYTE_FIELD(this, kBinaryOpTypeOffset); 2729 return READ_BYTE_FIELD(this, kBinaryOpTypeOffset);
2717 } 2730 }
2718 2731
2719 2732
2720 void Code::set_type_recording_binary_op_type(byte value) { 2733 void Code::set_type_recording_binary_op_type(byte value) {
2721 ASSERT(is_type_recording_binary_op_stub()); 2734 ASSERT(is_type_recording_binary_op_stub());
2722 WRITE_BYTE_FIELD(this, kBinaryOpTypeOffset, value); 2735 WRITE_BYTE_FIELD(this, kBinaryOpTypeOffset, value);
2723 } 2736 }
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
4185 #undef WRITE_INT_FIELD 4198 #undef WRITE_INT_FIELD
4186 #undef READ_SHORT_FIELD 4199 #undef READ_SHORT_FIELD
4187 #undef WRITE_SHORT_FIELD 4200 #undef WRITE_SHORT_FIELD
4188 #undef READ_BYTE_FIELD 4201 #undef READ_BYTE_FIELD
4189 #undef WRITE_BYTE_FIELD 4202 #undef WRITE_BYTE_FIELD
4190 4203
4191 4204
4192 } } // namespace v8::internal 4205 } } // namespace v8::internal
4193 4206
4194 #endif // V8_OBJECTS_INL_H_ 4207 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/ic.cc ('K') | « src/objects.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698