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

Unified Diff: src/stub-cache.h

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/splay-tree.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.h
===================================================================
--- src/stub-cache.h (revision 7948)
+++ src/stub-cache.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -28,8 +28,10 @@
#ifndef V8_STUB_CACHE_H_
#define V8_STUB_CACHE_H_
+#include "allocation.h"
#include "arguments.h"
#include "macro-assembler.h"
+#include "objects.h"
#include "zone-inl.h"
namespace v8 {
@@ -143,9 +145,6 @@
String* name,
JSFunction* receiver);
- MUST_USE_RESULT MaybeObject* ComputeKeyedLoadSpecialized(
- JSObject* receiver);
-
// ---
MUST_USE_RESULT MaybeObject* ComputeStoreField(
@@ -184,16 +183,15 @@
Map* transition,
StrictModeFlag strict_mode);
- MUST_USE_RESULT MaybeObject* ComputeKeyedStoreSpecialized(
+ MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreExternalArray(
JSObject* receiver,
+ bool is_store,
StrictModeFlag strict_mode);
-
- MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreExternalArray(
+ MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreFastElement(
JSObject* receiver,
bool is_store,
StrictModeFlag strict_mode);
-
// ---
MUST_USE_RESULT MaybeObject* ComputeCallField(int argc,
@@ -468,8 +466,11 @@
Register scratch,
Label* miss_label);
- static void GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind);
+ static void GenerateLoadMiss(MacroAssembler* masm,
+ Code::Kind kind);
+ static void GenerateKeyedLoadMissForceGeneric(MacroAssembler* masm);
+
// Generates code that verifies that the property holder has not changed
// (checking maps of objects in the prototype chain for fast and global
// objects or doing negative lookup for slow objects, ensures that the
@@ -633,10 +634,21 @@
MUST_USE_RESULT MaybeObject* CompileLoadStringLength(String* name);
MUST_USE_RESULT MaybeObject* CompileLoadFunctionPrototype(String* name);
- MUST_USE_RESULT MaybeObject* CompileLoadSpecialized(JSObject* receiver);
+ MUST_USE_RESULT MaybeObject* CompileLoadFastElement(Map* receiver_map);
+ MUST_USE_RESULT MaybeObject* CompileLoadMegamorphic(
+ MapList* receiver_maps,
+ CodeList* handler_ics);
+
+ static void GenerateLoadExternalArray(MacroAssembler* masm,
+ ExternalArrayType array_type);
+
+ static void GenerateLoadFastElement(MacroAssembler* masm);
+
private:
- MaybeObject* GetCode(PropertyType type, String* name);
+ MaybeObject* GetCode(PropertyType type,
+ String* name,
+ InlineCacheState state = MONOMORPHIC);
};
@@ -677,10 +689,22 @@
Map* transition,
String* name);
- MUST_USE_RESULT MaybeObject* CompileStoreSpecialized(JSObject* receiver);
+ MUST_USE_RESULT MaybeObject* CompileStoreFastElement(Map* receiver_map);
+ MUST_USE_RESULT MaybeObject* CompileStoreMegamorphic(
+ MapList* receiver_maps,
+ CodeList* handler_ics);
+
+ static void GenerateStoreFastElement(MacroAssembler* masm,
+ bool is_js_array);
+
+ static void GenerateStoreExternalArray(MacroAssembler* masm,
+ ExternalArrayType array_type);
+
private:
- MaybeObject* GetCode(PropertyType type, String* name);
+ MaybeObject* GetCode(PropertyType type,
+ String* name,
+ InlineCacheState state = MONOMORPHIC);
StrictModeFlag strict_mode_;
};
@@ -847,20 +871,36 @@
CallHandlerInfo* api_call_info_;
};
-class ExternalArrayStubCompiler: public StubCompiler {
+class ExternalArrayLoadStubCompiler: public StubCompiler {
public:
- explicit ExternalArrayStubCompiler() {}
+ explicit ExternalArrayLoadStubCompiler(StrictModeFlag strict_mode)
+ : strict_mode_(strict_mode) { }
- MUST_USE_RESULT MaybeObject* CompileKeyedLoadStub(
- JSObject* receiver, ExternalArrayType array_type, Code::Flags flags);
+ MUST_USE_RESULT MaybeObject* CompileLoad(
+ JSObject* receiver, ExternalArrayType array_type);
- MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub(
- JSObject* receiver, ExternalArrayType array_type, Code::Flags flags);
+ private:
+ MaybeObject* GetCode();
+ StrictModeFlag strict_mode_;
+};
+
+
+class ExternalArrayStoreStubCompiler: public StubCompiler {
+ public:
+ explicit ExternalArrayStoreStubCompiler(StrictModeFlag strict_mode)
+ : strict_mode_(strict_mode) {}
+
+ MUST_USE_RESULT MaybeObject* CompileStore(
+ JSObject* receiver, ExternalArrayType array_type);
+
private:
- MaybeObject* GetCode(Code::Flags flags);
+ MaybeObject* GetCode();
+
+ StrictModeFlag strict_mode_;
};
+
} } // namespace v8::internal
#endif // V8_STUB_CACHE_H_
« no previous file with comments | « src/splay-tree.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698