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

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: 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 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2574 int Code::major_key() { 2574 int Code::major_key() {
2575 ASSERT(kind() == STUB || 2575 ASSERT(kind() == STUB ||
2576 kind() == TYPE_RECORDING_BINARY_OP_IC || 2576 kind() == TYPE_RECORDING_BINARY_OP_IC ||
2577 kind() == COMPARE_IC); 2577 kind() == COMPARE_IC);
2578 return READ_BYTE_FIELD(this, kStubMajorKeyOffset); 2578 return READ_BYTE_FIELD(this, kStubMajorKeyOffset);
2579 } 2579 }
2580 2580
2581 2581
2582 void Code::set_major_key(int major) { 2582 void Code::set_major_key(int major) {
2583 ASSERT(kind() == STUB || 2583 ASSERT(kind() == STUB ||
2584 kind() == TYPE_RECORDING_UNARY_OP_IC ||
2584 kind() == TYPE_RECORDING_BINARY_OP_IC || 2585 kind() == TYPE_RECORDING_BINARY_OP_IC ||
2585 kind() == COMPARE_IC); 2586 kind() == COMPARE_IC);
2586 ASSERT(0 <= major && major < 256); 2587 ASSERT(0 <= major && major < 256);
2587 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major); 2588 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major);
2588 } 2589 }
2589 2590
2590 2591
2591 bool Code::optimizable() { 2592 bool Code::optimizable() {
2592 ASSERT(kind() == FUNCTION); 2593 ASSERT(kind() == FUNCTION);
2593 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; 2594 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
2682 return static_cast<ExternalArrayType>(type); 2683 return static_cast<ExternalArrayType>(type);
2683 } 2684 }
2684 2685
2685 2686
2686 void Code::set_external_array_type(ExternalArrayType value) { 2687 void Code::set_external_array_type(ExternalArrayType value) {
2687 ASSERT(is_external_array_load_stub() || is_external_array_store_stub()); 2688 ASSERT(is_external_array_load_stub() || is_external_array_store_stub());
2688 WRITE_BYTE_FIELD(this, kExternalArrayTypeOffset, value); 2689 WRITE_BYTE_FIELD(this, kExternalArrayTypeOffset, value);
2689 } 2690 }
2690 2691
2691 2692
2693 byte Code::type_recording_unary_op_type() {
2694 ASSERT(is_type_recording_unary_op_stub());
2695 return READ_BYTE_FIELD(this, kUnaryOpTypeOffset);
2696 }
2697
2698
2699 void Code::set_type_recording_unary_op_type(byte value) {
2700 ASSERT(is_type_recording_unary_op_stub());
2701 WRITE_BYTE_FIELD(this, kUnaryOpTypeOffset, value);
2702 }
2703
2704
2692 byte Code::type_recording_binary_op_type() { 2705 byte Code::type_recording_binary_op_type() {
2693 ASSERT(is_type_recording_binary_op_stub()); 2706 ASSERT(is_type_recording_binary_op_stub());
2694 return READ_BYTE_FIELD(this, kBinaryOpTypeOffset); 2707 return READ_BYTE_FIELD(this, kBinaryOpTypeOffset);
2695 } 2708 }
2696 2709
2697 2710
2698 void Code::set_type_recording_binary_op_type(byte value) { 2711 void Code::set_type_recording_binary_op_type(byte value) {
2699 ASSERT(is_type_recording_binary_op_stub()); 2712 ASSERT(is_type_recording_binary_op_stub());
2700 WRITE_BYTE_FIELD(this, kBinaryOpTypeOffset, value); 2713 WRITE_BYTE_FIELD(this, kBinaryOpTypeOffset, value);
2701 } 2714 }
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
4157 #undef WRITE_INT_FIELD 4170 #undef WRITE_INT_FIELD
4158 #undef READ_SHORT_FIELD 4171 #undef READ_SHORT_FIELD
4159 #undef WRITE_SHORT_FIELD 4172 #undef WRITE_SHORT_FIELD
4160 #undef READ_BYTE_FIELD 4173 #undef READ_BYTE_FIELD
4161 #undef WRITE_BYTE_FIELD 4174 #undef WRITE_BYTE_FIELD
4162 4175
4163 4176
4164 } } // namespace v8::internal 4177 } } // namespace v8::internal
4165 4178
4166 #endif // V8_OBJECTS_INL_H_ 4179 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/arm/code-stubs-arm.cc ('K') | « src/objects.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698