forked from dart-archive/angular.dart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Use precomputed keys with injector for performance reasons.
Closes dart-archive#1081
- Loading branch information
Showing
23 changed files
with
139 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
library angular.static_keys; | ||
|
||
import 'package:di/di.dart'; | ||
import 'module_internal.dart'; | ||
|
||
Key EXCEPTION_HANDLER_KEY = new Key(ExceptionHandler); | ||
Key ROOT_SCOPE_KEY = new Key(RootScope); | ||
Key SCOPE_KEY = new Key(Scope); | ||
Key SCOPE_STATS_CONFIG_KEY = new Key(ScopeStatsConfig); | ||
Key FORMATTER_MAP_KEY = new Key(FormatterMap); | ||
Key INTERPOLATE_KEY = new Key(Interpolate); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
part of angular.core.dom_internal; | ||
library angular.core_dom.static_keys; | ||
|
||
import 'dart:html' as dom; | ||
import 'package:di/di.dart'; | ||
import 'package:angular/core/static_keys.dart'; | ||
import 'package:angular/core_dom/module_internal.dart'; | ||
|
||
export 'package:angular/directive/static_keys.dart' show NG_BASE_CSS_KEY; | ||
export 'package:angular/core/static_keys.dart'; | ||
|
||
// Keys used to call Injector.getByKey and Module.bindByKey | ||
|
||
Key _ANIMATE_KEY = new Key(Animate); | ||
Key _BOUND_VIEW_FACTORY_KEY = new Key(BoundViewFactory); | ||
Key _COMPONENT_CSS_REWRITER_KEY = new Key(ComponentCssRewriter); | ||
Key _DIRECTIVE_MAP_KEY = new Key(DirectiveMap); | ||
Key _ELEMENT_KEY = new Key(dom.Element); | ||
Key _ELEMENT_PROBE_KEY = new Key(ElementProbe); | ||
Key _ELEMENT_PROBE = new Key(ElementProbe); | ||
Key _EVENT_HANDLER_KEY = new Key(EventHandler); | ||
Key _FORMATTER_MAP_KEY = new Key(FormatterMap); | ||
Key _HTTP_KEY = new Key(Http); | ||
Key _INTERPOLATE_KEY = new Key(Interpolate); | ||
Key _NG_BASE_CSS_KEY = new Key(NgBaseCss); | ||
Key _NG_ELEMENT_KEY = new Key(NgElement); | ||
Key _NODE_ATTRS_KEY = new Key(NodeAttrs); | ||
Key _NODE_KEY = new Key(dom.Node); | ||
Key _NODE_TREE_SANITIZER_KEY = new Key(dom.NodeTreeSanitizer); | ||
Key _SCOPE_KEY = new Key(Scope); | ||
Key _SHADOW_ROOT_KEY = new Key(dom.ShadowRoot); | ||
Key _TEMPLATE_CACHE_KEY = new Key(TemplateCache); | ||
Key _TEMPLATE_LOADER_KEY = new Key(TemplateLoader); | ||
Key _TEXT_MUSTACHE_KEY = new Key(TextMustache); | ||
Key _VIEW_CACHE_KEY = new Key(ViewCache); | ||
Key _VIEW_FACTORY_KEY = new Key(ViewFactory); | ||
Key _VIEW_KEY = new Key(View); | ||
Key _VIEW_PORT_KEY = new Key(ViewPort); | ||
Key _WEB_PLATFORM_KEY = new Key(WebPlatform); | ||
Key ANIMATE_KEY = new Key(Animate); | ||
Key BOUND_VIEW_FACTORY_KEY = new Key(BoundViewFactory); | ||
Key COMPILER_KEY = new Key(Compiler); | ||
Key COMPONENT_CSS_REWRITER_KEY = new Key(ComponentCssRewriter); | ||
Key DIRECTIVE_MAP_KEY = new Key(DirectiveMap); | ||
Key ELEMENT_KEY = new Key(dom.Element); | ||
Key ELEMENT_PROBE_KEY = new Key(ElementProbe); | ||
Key EVENT_HANDLER_KEY = new Key(EventHandler); | ||
Key HTTP_KEY = new Key(Http); | ||
Key NG_ELEMENT_KEY = new Key(NgElement); | ||
Key NODE_ATTRS_KEY = new Key(NodeAttrs); | ||
Key NODE_KEY = new Key(dom.Node); | ||
Key NODE_TREE_SANITIZER_KEY = new Key(dom.NodeTreeSanitizer); | ||
Key SHADOW_ROOT_KEY = new Key(dom.ShadowRoot); | ||
Key TEMPLATE_CACHE_KEY = new Key(TemplateCache); | ||
Key TEMPLATE_LOADER_KEY = new Key(TemplateLoader); | ||
Key TEXT_MUSTACHE_KEY = new Key(TextMustache); | ||
Key VIEW_CACHE_KEY = new Key(ViewCache); | ||
Key VIEW_FACTORY_KEY = new Key(ViewFactory); | ||
Key VIEW_KEY = new Key(View); | ||
Key VIEW_PORT_KEY = new Key(ViewPort); | ||
Key WEB_PLATFORM_KEY = new Key(WebPlatform); | ||
Key WINDOW_KEY = new Key(dom.Window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
library angular.directive.static_keys; | ||
|
||
import 'package:di/di.dart'; | ||
import 'package:angular/directive/module.dart'; | ||
import 'package:angular/core_dom/static_keys.dart'; | ||
|
||
export 'package:angular/core_dom/static_keys.dart'; | ||
|
||
Key NG_CONTROL_KEY = new Key(NgControl); | ||
Key NG_FORM_KEY = new Key(NgForm); | ||
Key NG_BASE_CSS_KEY = new Key(NgBaseCss); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
library angular.mock.static_keys; | ||
|
||
import 'package:di/di.dart'; | ||
import 'package:angular/mock/module.dart'; | ||
|
||
export 'package:angular/core_dom/static_keys.dart' show DIRECTIVE_MAP_KEY; | ||
|
||
Key MOCK_HTTP_BACKEND_KEY = new Key(MockHttpBackend); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.