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

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, 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 4421 matching lines...) Expand 10 before | Expand all | Expand 10 after
4432 4432
4433 bool Code::has_major_key() { 4433 bool Code::has_major_key() {
4434 return kind() == STUB || 4434 return kind() == STUB ||
4435 kind() == HANDLER || 4435 kind() == HANDLER ||
4436 kind() == BINARY_OP_IC || 4436 kind() == BINARY_OP_IC ||
4437 kind() == COMPARE_IC || 4437 kind() == COMPARE_IC ||
4438 kind() == COMPARE_NIL_IC || 4438 kind() == COMPARE_NIL_IC ||
4439 kind() == LOAD_IC || 4439 kind() == LOAD_IC ||
4440 kind() == KEYED_LOAD_IC || 4440 kind() == KEYED_LOAD_IC ||
4441 kind() == STORE_IC || 4441 kind() == STORE_IC ||
4442 kind() == CALL_IC ||
4442 kind() == KEYED_STORE_IC || 4443 kind() == KEYED_STORE_IC ||
4443 kind() == TO_BOOLEAN_IC; 4444 kind() == TO_BOOLEAN_IC;
4444 } 4445 }
4445 4446
4446 4447
4447 bool Code::optimizable() { 4448 bool Code::optimizable() {
4448 ASSERT_EQ(FUNCTION, kind()); 4449 ASSERT_EQ(FUNCTION, kind());
4449 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; 4450 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
4450 } 4451 }
4451 4452
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
5887 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { 5888 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) {
5888 ASSERT(kind() == FUNCTION); 5889 ASSERT(kind() == FUNCTION);
5889 set_raw_type_feedback_info(value, mode); 5890 set_raw_type_feedback_info(value, mode);
5890 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, 5891 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset,
5891 value, mode); 5892 value, mode);
5892 } 5893 }
5893 5894
5894 5895
5895 int Code::stub_info() { 5896 int Code::stub_info() {
5896 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || 5897 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
5897 kind() == BINARY_OP_IC || kind() == LOAD_IC); 5898 kind() == BINARY_OP_IC || kind() == LOAD_IC || kind() == CALL_IC);
5898 return Smi::cast(raw_type_feedback_info())->value(); 5899 return Smi::cast(raw_type_feedback_info())->value();
5899 } 5900 }
5900 5901
5901 5902
5902 void Code::set_stub_info(int value) { 5903 void Code::set_stub_info(int value) {
5903 ASSERT(kind() == COMPARE_IC || 5904 ASSERT(kind() == COMPARE_IC ||
5904 kind() == COMPARE_NIL_IC || 5905 kind() == COMPARE_NIL_IC ||
5905 kind() == BINARY_OP_IC || 5906 kind() == BINARY_OP_IC ||
5906 kind() == STUB || 5907 kind() == STUB ||
5907 kind() == LOAD_IC || 5908 kind() == LOAD_IC ||
5909 kind() == CALL_IC ||
5908 kind() == KEYED_LOAD_IC || 5910 kind() == KEYED_LOAD_IC ||
5909 kind() == STORE_IC || 5911 kind() == STORE_IC ||
5910 kind() == KEYED_STORE_IC); 5912 kind() == KEYED_STORE_IC);
5911 set_raw_type_feedback_info(Smi::FromInt(value)); 5913 set_raw_type_feedback_info(Smi::FromInt(value));
5912 } 5914 }
5913 5915
5914 5916
5915 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) 5917 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset)
5916 INT_ACCESSORS(Code, ic_age, kICAgeOffset) 5918 INT_ACCESSORS(Code, ic_age, kICAgeOffset)
5917 5919
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
6941 #undef READ_UINT32_FIELD 6943 #undef READ_UINT32_FIELD
6942 #undef WRITE_UINT32_FIELD 6944 #undef WRITE_UINT32_FIELD
6943 #undef READ_SHORT_FIELD 6945 #undef READ_SHORT_FIELD
6944 #undef WRITE_SHORT_FIELD 6946 #undef WRITE_SHORT_FIELD
6945 #undef READ_BYTE_FIELD 6947 #undef READ_BYTE_FIELD
6946 #undef WRITE_BYTE_FIELD 6948 #undef WRITE_BYTE_FIELD
6947 6949
6948 } } // namespace v8::internal 6950 } } // namespace v8::internal
6949 6951
6950 #endif // V8_OBJECTS_INL_H_ 6952 #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