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

Side by Side Diff: src/objects-inl.h

Issue 224903005: Reland "create a function call IC" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments. Created 6 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
« no previous file with comments | « src/objects.cc ('k') | src/objects-visiting-inl.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4415 matching lines...) Expand 10 before | Expand all | Expand 10 after
4426 4426
4427 bool Code::has_major_key() { 4427 bool Code::has_major_key() {
4428 return kind() == STUB || 4428 return kind() == STUB ||
4429 kind() == HANDLER || 4429 kind() == HANDLER ||
4430 kind() == BINARY_OP_IC || 4430 kind() == BINARY_OP_IC ||
4431 kind() == COMPARE_IC || 4431 kind() == COMPARE_IC ||
4432 kind() == COMPARE_NIL_IC || 4432 kind() == COMPARE_NIL_IC ||
4433 kind() == LOAD_IC || 4433 kind() == LOAD_IC ||
4434 kind() == KEYED_LOAD_IC || 4434 kind() == KEYED_LOAD_IC ||
4435 kind() == STORE_IC || 4435 kind() == STORE_IC ||
4436 kind() == CALL_IC ||
4436 kind() == KEYED_STORE_IC || 4437 kind() == KEYED_STORE_IC ||
4437 kind() == TO_BOOLEAN_IC; 4438 kind() == TO_BOOLEAN_IC;
4438 } 4439 }
4439 4440
4440 4441
4441 bool Code::optimizable() { 4442 bool Code::optimizable() {
4442 ASSERT_EQ(FUNCTION, kind()); 4443 ASSERT_EQ(FUNCTION, kind());
4443 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; 4444 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
4444 } 4445 }
4445 4446
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
5870 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { 5871 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) {
5871 ASSERT(kind() == FUNCTION); 5872 ASSERT(kind() == FUNCTION);
5872 set_raw_type_feedback_info(value, mode); 5873 set_raw_type_feedback_info(value, mode);
5873 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, 5874 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset,
5874 value, mode); 5875 value, mode);
5875 } 5876 }
5876 5877
5877 5878
5878 int Code::stub_info() { 5879 int Code::stub_info() {
5879 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || 5880 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
5880 kind() == BINARY_OP_IC || kind() == LOAD_IC); 5881 kind() == BINARY_OP_IC || kind() == LOAD_IC || kind() == CALL_IC);
5881 return Smi::cast(raw_type_feedback_info())->value(); 5882 return Smi::cast(raw_type_feedback_info())->value();
5882 } 5883 }
5883 5884
5884 5885
5885 void Code::set_stub_info(int value) { 5886 void Code::set_stub_info(int value) {
5886 ASSERT(kind() == COMPARE_IC || 5887 ASSERT(kind() == COMPARE_IC ||
5887 kind() == COMPARE_NIL_IC || 5888 kind() == COMPARE_NIL_IC ||
5888 kind() == BINARY_OP_IC || 5889 kind() == BINARY_OP_IC ||
5889 kind() == STUB || 5890 kind() == STUB ||
5890 kind() == LOAD_IC || 5891 kind() == LOAD_IC ||
5892 kind() == CALL_IC ||
5891 kind() == KEYED_LOAD_IC || 5893 kind() == KEYED_LOAD_IC ||
5892 kind() == STORE_IC || 5894 kind() == STORE_IC ||
5893 kind() == KEYED_STORE_IC); 5895 kind() == KEYED_STORE_IC);
5894 set_raw_type_feedback_info(Smi::FromInt(value)); 5896 set_raw_type_feedback_info(Smi::FromInt(value));
5895 } 5897 }
5896 5898
5897 5899
5898 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) 5900 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset)
5899 INT_ACCESSORS(Code, ic_age, kICAgeOffset) 5901 INT_ACCESSORS(Code, ic_age, kICAgeOffset)
5900 5902
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
6924 #undef READ_UINT32_FIELD 6926 #undef READ_UINT32_FIELD
6925 #undef WRITE_UINT32_FIELD 6927 #undef WRITE_UINT32_FIELD
6926 #undef READ_SHORT_FIELD 6928 #undef READ_SHORT_FIELD
6927 #undef WRITE_SHORT_FIELD 6929 #undef WRITE_SHORT_FIELD
6928 #undef READ_BYTE_FIELD 6930 #undef READ_BYTE_FIELD
6929 #undef WRITE_BYTE_FIELD 6931 #undef WRITE_BYTE_FIELD
6930 6932
6931 } } // namespace v8::internal 6933 } } // namespace v8::internal
6932 6934
6933 #endif // V8_OBJECTS_INL_H_ 6935 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698