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

Side by Side Diff: src/codegen.h

Issue 2808030: [Isolates] Move InlineRuntimeFunctionTable from runtime.h to codegen.h.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 10 years, 5 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 | « no previous file | src/isolate.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // CodeForSourcePosition 73 // CodeForSourcePosition
74 74
75 75
76 // Mode to overwrite BinaryExpression values. 76 // Mode to overwrite BinaryExpression values.
77 enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT }; 77 enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
78 78
79 // Types of uncatchable exceptions. 79 // Types of uncatchable exceptions.
80 enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION }; 80 enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION };
81 81
82 82
83 namespace v8 {
84 namespace internal {
85
86 class InlineRuntimeFunctionsTable {
87 public:
88 enum {
89 #define LUT_ENTRY(name, argc, resize) __##name,
90 INLINE_RUNTIME_FUNCTION_LIST(LUT_ENTRY)
91 kInlineRuntimeFunctionsTableSize
92 #undef LUT_ENTRY
93 };
94
95 struct Entry {
96 void (CodeGenerator::*method)(ZoneList<Expression*>*);
97 const char* name;
98 int nargs;
99 };
100
101 Entry* entries() { return entries_; }
102
103 private:
104 InlineRuntimeFunctionsTable();
105
106 Entry entries_[kInlineRuntimeFunctionsTableSize];
107
108 friend class Isolate;
109
110 DISALLOW_COPY_AND_ASSIGN(InlineRuntimeFunctionsTable);
111 };
112
113 } // namespace internal
114 } // namespace v8
115
83 #if V8_TARGET_ARCH_IA32 116 #if V8_TARGET_ARCH_IA32
84 #include "ia32/codegen-ia32.h" 117 #include "ia32/codegen-ia32.h"
85 #elif V8_TARGET_ARCH_X64 118 #elif V8_TARGET_ARCH_X64
86 #include "x64/codegen-x64.h" 119 #include "x64/codegen-x64.h"
87 #elif V8_TARGET_ARCH_ARM 120 #elif V8_TARGET_ARCH_ARM
88 #include "arm/codegen-arm.h" 121 #include "arm/codegen-arm.h"
89 #elif V8_TARGET_ARCH_MIPS 122 #elif V8_TARGET_ARCH_MIPS
90 #include "mips/codegen-mips.h" 123 #include "mips/codegen-mips.h"
91 #else 124 #else
92 #error Unsupported target architecture. 125 #error Unsupported target architecture.
93 #endif 126 #endif
94 127
95 #include "register-allocator.h" 128 #include "register-allocator.h"
96 129
97 namespace v8 { 130 namespace v8 {
98 namespace internal { 131 namespace internal {
99 132
100
101 // Support for "structured" code comments. 133 // Support for "structured" code comments.
102 #ifdef DEBUG 134 #ifdef DEBUG
103 135
104 class Comment BASE_EMBEDDED { 136 class Comment BASE_EMBEDDED {
105 public: 137 public:
106 Comment(MacroAssembler* masm, const char* msg); 138 Comment(MacroAssembler* masm, const char* msg);
107 ~Comment(); 139 ~Comment();
108 140
109 private: 141 private:
110 MacroAssembler* masm_; 142 MacroAssembler* masm_;
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 StringCharFromCodeGenerator char_from_code_generator_; 855 StringCharFromCodeGenerator char_from_code_generator_;
824 856
825 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); 857 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator);
826 }; 858 };
827 859
828 860
829 } // namespace internal 861 } // namespace internal
830 } // namespace v8 862 } // namespace v8
831 863
832 #endif // V8_CODEGEN_H_ 864 #endif // V8_CODEGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698