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

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

Issue 172523002: Create a function call IC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments addressed. Created 6 years, 9 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 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 4224 matching lines...) Expand 10 before | Expand all | Expand 10 after
4235 4235
4236 bool Code::has_major_key() { 4236 bool Code::has_major_key() {
4237 return kind() == STUB || 4237 return kind() == STUB ||
4238 kind() == HANDLER || 4238 kind() == HANDLER ||
4239 kind() == BINARY_OP_IC || 4239 kind() == BINARY_OP_IC ||
4240 kind() == COMPARE_IC || 4240 kind() == COMPARE_IC ||
4241 kind() == COMPARE_NIL_IC || 4241 kind() == COMPARE_NIL_IC ||
4242 kind() == LOAD_IC || 4242 kind() == LOAD_IC ||
4243 kind() == KEYED_LOAD_IC || 4243 kind() == KEYED_LOAD_IC ||
4244 kind() == STORE_IC || 4244 kind() == STORE_IC ||
4245 kind() == CALL_IC ||
4245 kind() == KEYED_STORE_IC || 4246 kind() == KEYED_STORE_IC ||
4246 kind() == TO_BOOLEAN_IC; 4247 kind() == TO_BOOLEAN_IC;
4247 } 4248 }
4248 4249
4249 4250
4250 bool Code::optimizable() { 4251 bool Code::optimizable() {
4251 ASSERT_EQ(FUNCTION, kind()); 4252 ASSERT_EQ(FUNCTION, kind());
4252 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; 4253 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
4253 } 4254 }
4254 4255
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
5697 void Code::set_next_code_link(Object* value, WriteBarrierMode mode) { 5698 void Code::set_next_code_link(Object* value, WriteBarrierMode mode) {
5698 CHECK(kind() == OPTIMIZED_FUNCTION); 5699 CHECK(kind() == OPTIMIZED_FUNCTION);
5699 set_raw_type_feedback_info(value); 5700 set_raw_type_feedback_info(value);
5700 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, 5701 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset,
5701 value, mode); 5702 value, mode);
5702 } 5703 }
5703 5704
5704 5705
5705 int Code::stub_info() { 5706 int Code::stub_info() {
5706 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || 5707 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
5707 kind() == BINARY_OP_IC || kind() == LOAD_IC); 5708 kind() == BINARY_OP_IC || kind() == LOAD_IC || kind() == CALL_IC);
5708 return Smi::cast(raw_type_feedback_info())->value(); 5709 return Smi::cast(raw_type_feedback_info())->value();
5709 } 5710 }
5710 5711
5711 5712
5712 void Code::set_stub_info(int value) { 5713 void Code::set_stub_info(int value) {
5713 ASSERT(kind() == COMPARE_IC || 5714 ASSERT(kind() == COMPARE_IC ||
5714 kind() == COMPARE_NIL_IC || 5715 kind() == COMPARE_NIL_IC ||
5715 kind() == BINARY_OP_IC || 5716 kind() == BINARY_OP_IC ||
5716 kind() == STUB || 5717 kind() == STUB ||
5717 kind() == LOAD_IC || 5718 kind() == LOAD_IC ||
5719 kind() == CALL_IC ||
5718 kind() == KEYED_LOAD_IC || 5720 kind() == KEYED_LOAD_IC ||
5719 kind() == STORE_IC || 5721 kind() == STORE_IC ||
5720 kind() == KEYED_STORE_IC); 5722 kind() == KEYED_STORE_IC);
5721 set_raw_type_feedback_info(Smi::FromInt(value)); 5723 set_raw_type_feedback_info(Smi::FromInt(value));
5722 } 5724 }
5723 5725
5724 5726
5725 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) 5727 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset)
5726 INT_ACCESSORS(Code, ic_age, kICAgeOffset) 5728 INT_ACCESSORS(Code, ic_age, kICAgeOffset)
5727 5729
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
6732 #undef READ_UINT32_FIELD 6734 #undef READ_UINT32_FIELD
6733 #undef WRITE_UINT32_FIELD 6735 #undef WRITE_UINT32_FIELD
6734 #undef READ_SHORT_FIELD 6736 #undef READ_SHORT_FIELD
6735 #undef WRITE_SHORT_FIELD 6737 #undef WRITE_SHORT_FIELD
6736 #undef READ_BYTE_FIELD 6738 #undef READ_BYTE_FIELD
6737 #undef WRITE_BYTE_FIELD 6739 #undef WRITE_BYTE_FIELD
6738 6740
6739 } } // namespace v8::internal 6741 } } // namespace v8::internal
6740 6742
6741 #endif // V8_OBJECTS_INL_H_ 6743 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/ic.cc ('K') | « src/objects.h ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698