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

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: Rebase 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
« src/ic.cc ('K') | « src/objects.h ('k') | no next file » | 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 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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
5698 void Code::set_next_code_link(Object* value, WriteBarrierMode mode) { 5699 void Code::set_next_code_link(Object* value, WriteBarrierMode mode) {
5699 CHECK(kind() == OPTIMIZED_FUNCTION); 5700 CHECK(kind() == OPTIMIZED_FUNCTION);
5700 set_raw_type_feedback_info(value); 5701 set_raw_type_feedback_info(value);
5701 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, 5702 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset,
5702 value, mode); 5703 value, mode);
5703 } 5704 }
5704 5705
5705 5706
5706 int Code::stub_info() { 5707 int Code::stub_info() {
5707 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || 5708 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
5708 kind() == BINARY_OP_IC || kind() == LOAD_IC); 5709 kind() == BINARY_OP_IC || kind() == LOAD_IC || kind() == CALL_IC);
5709 return Smi::cast(raw_type_feedback_info())->value(); 5710 return Smi::cast(raw_type_feedback_info())->value();
5710 } 5711 }
5711 5712
5712 5713
5713 void Code::set_stub_info(int value) { 5714 void Code::set_stub_info(int value) {
5714 ASSERT(kind() == COMPARE_IC || 5715 ASSERT(kind() == COMPARE_IC ||
5715 kind() == COMPARE_NIL_IC || 5716 kind() == COMPARE_NIL_IC ||
5716 kind() == BINARY_OP_IC || 5717 kind() == BINARY_OP_IC ||
5717 kind() == STUB || 5718 kind() == STUB ||
5718 kind() == LOAD_IC || 5719 kind() == LOAD_IC ||
5720 kind() == CALL_IC ||
5719 kind() == KEYED_LOAD_IC || 5721 kind() == KEYED_LOAD_IC ||
5720 kind() == STORE_IC || 5722 kind() == STORE_IC ||
5721 kind() == KEYED_STORE_IC); 5723 kind() == KEYED_STORE_IC);
5722 set_raw_type_feedback_info(Smi::FromInt(value)); 5724 set_raw_type_feedback_info(Smi::FromInt(value));
5723 } 5725 }
5724 5726
5725 5727
5726 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) 5728 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset)
5727 INT_ACCESSORS(Code, ic_age, kICAgeOffset) 5729 INT_ACCESSORS(Code, ic_age, kICAgeOffset)
5728 5730
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
6733 #undef READ_UINT32_FIELD 6735 #undef READ_UINT32_FIELD
6734 #undef WRITE_UINT32_FIELD 6736 #undef WRITE_UINT32_FIELD
6735 #undef READ_SHORT_FIELD 6737 #undef READ_SHORT_FIELD
6736 #undef WRITE_SHORT_FIELD 6738 #undef WRITE_SHORT_FIELD
6737 #undef READ_BYTE_FIELD 6739 #undef READ_BYTE_FIELD
6738 #undef WRITE_BYTE_FIELD 6740 #undef WRITE_BYTE_FIELD
6739 6741
6740 } } // namespace v8::internal 6742 } } // namespace v8::internal
6741 6743
6742 #endif // V8_OBJECTS_INL_H_ 6744 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/ic.cc ('K') | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698